Compare commits

...
546 Commits
Author SHA1 Message Date
Vicky Risk c65f307d57 Update release.md 2019-08-29 19:57:45 -04:00
Ondřej Surý 3b8a52264c Merge branch 'ondrej/vicky/add-coc' into 'master'
Add Code of Conduct

See merge request isc-projects/bind9!2219
2019-08-29 15:04:44 -04:00
Ondřej Surý db00eb2fa9 Add Code of Conduct adapted from Django Code of Conduct 2019-08-29 21:01:29 +02:00
Evan Hunt 8b5aa19ed9 Merge branch 'each-simplify-rbtnodechain' into 'master'
simplify dns_rbtnodechain_init() by removing unnecessary 'mctx' parameter

See merge request isc-projects/bind9!2273
2019-08-29 13:29:45 -04:00
Evan Hunt a8595262f7 add a semantic patch for the API change 2019-08-29 10:07:41 -07:00
Evan Hunt c48979e6c5 simplify dns_rbtnodechain_init() by removing unnecessary 'mctx' parameter 2019-08-29 10:03:36 -07:00
Ondřej Surý ca52242661 Merge branch 'ondrej/use-needs-kw-in-gitlab-ci' into 'master'
Ondrej/use needs kw in gitlab ci

See merge request isc-projects/bind9!2280
2019-08-29 08:58:37 -04:00
Ondřej Surý 3f2de6d39c Swap unit and system stages 2019-08-29 14:39:08 +02:00
Ondřej Surý fc834aa4bc Further improve the CI by starting the build and docs right after autoreconf 2019-08-29 14:37:33 +02:00
Ondřej Surý 008b73fb41 Split the system and unit tests into separate stages 2019-08-29 14:32:27 +02:00
Ondřej Surý 04ce124279 Make use of DAG for GitLab Pipelines
GitLab 12.2 has introduced Directed Acyclic Graphs in the GitLab CI[1] that
allow jobs to run out-of-order and not wait for the whole previous stage to
complete.

1. https://docs.gitlab.com/ee/ci/directed_acyclic_graph/
2019-08-29 14:31:37 +02:00
Ondřej Surý 057e9fdb51 Merge branch 'ondrej/missing-extern-in-dighost_error-declaration' into 'master'
dighost_error declaration in dig/dig.h was missing extern

See merge request isc-projects/bind9!2278
2019-08-29 07:05:26 -04:00
Ondřej Surý f1a887a0b9 dighost_error declaration in dig/dig.h was missing extern 2019-08-29 11:24:16 +02:00
Mark Andrews d9e96809ac Merge branch '1199-return-value-from-open-not-checked' into 'master'
Resolve "Return value from open() not checked."

Closes #1199

See merge request isc-projects/bind9!2264
2019-08-28 20:17:01 -04:00
Mark Andrews 510306c654 check that open() succeeded 2019-08-28 19:50:44 -04:00
Mark Andrews 9d3205e894 Merge branch '1201-add-llq-option' into 'master'
Resolve "Add LLQ option"

Closes #1201

See merge request isc-projects/bind9!2267
2019-08-28 02:41:43 -04:00
Mark Andrews d98f446d3f Add support for displaying EDNS option LLQ. 2019-08-28 16:13:43 +10:00
Mark Andrews c8ed70a108 Merge branch '1187-ddns-rejected-if-zone-contains-cds-cdnskey' into 'master'
Resolve "DDNS rejected if zone contains CDS/CDNSKEY"

Closes #1187

See merge request isc-projects/bind9!2254
2019-08-28 02:09:39 -04:00
Mark Andrews ba26c6eb48 add CHANGES 2019-08-28 15:47:16 +10:00
Mark Andrews 30610eb9a5 add good and bad CDS / CDNSKEY test zones 2019-08-28 15:46:41 +10:00
Mark Andrews 3705605e0b fix dnssec system tests that fail now that we call dns_zone_cdscheck 2019-08-28 15:46:41 +10:00
Mark Andrews cd40c9fe61 add dns_zone_cdscheck to integrity checks 2019-08-28 15:46:41 +10:00
Mark Andrews 2ebc4776ca implement getoriginnode for sdb 2019-08-28 15:46:41 +10:00
Evan Hunt ddd871bbea Merge branch 'each-tidy-glue-test' into 'master'
remove unneeded files and options from glue test

See merge request isc-projects/bind9!2238
2019-08-27 13:00:47 -04:00
Evan Hunt 7b65ea4c11 remove unneeded files and options from glue test
- the cache-file and check-itegrity options were not needed
- some zones and files were not used
2019-08-27 09:41:33 -07:00
Evan Hunt 417df8cfbc Merge branch 'each-dig-yaml' into 'master'
dig/delv/mdig +yaml output

Closes #1145

See merge request isc-projects/bind9!2168
2019-08-25 20:02:33 -04:00
Evan Hunt 2627287dbc CHANGES, README, relnotes 2019-08-25 16:41:39 -07:00
Evan Hunt 33887dd941 add digdelv +yaml system tests 2019-08-25 16:41:38 -07:00
Evan Hunt 617696fbfc document the +yaml option in dig, mdig and delv 2019-08-25 16:41:38 -07:00
Evan Hunt 241cf78fee add "delv +yaml" output format 2019-08-25 16:41:34 -07:00
Evan Hunt 5aa375f0d8 add "mdig +yaml" output format 2019-08-25 16:41:29 -07:00
Evan Hunt 71325852f1 add "dig +yaml" output format 2019-08-25 16:41:14 -07:00
Evan Hunt 89d5ecb04d Merge branch '1031-multiple-rate-limit-clauses-are-unsupported-master' into 'master'
Resolve "Multiple rate-limit clauses are unsupported"

See merge request isc-projects/bind9!2262
2019-08-21 11:04:14 -04:00
Mark AndrewsandEvan Hunt 9fc4be226d remove reference to rate-limit { domain ...; }
(cherry picked from commit 2275630bc9)
2019-08-21 08:40:09 -06:00
Tinderbox User e1792341ac Merge branch 'prep-release' 2019-08-12 14:08:48 +00:00
Tinderbox User 1b9b826518 prep 9.15.3 2019-08-12 14:08:12 +00:00
Tinderbox User d6a9407908 prep 9.15.3 2019-08-12 13:59:41 +00:00
Matthijs Mekking d60557be82 Merge branch '1074-matthijs-underflow-cachedb-statistics' into 'master'
Resolve "underflow in stats channel stale cached RRSIG gauge [ISC-support #14769]"

Closes #1074 and #602

See merge request isc-projects/bind9!2237
2019-08-12 04:39:30 -04:00
Matthijs Mekking 4c0b0fa6a5 Simplify do_stats logic in rbtdb.c 2019-08-12 10:16:08 +02:00
Evan HuntandMatthijs Mekking 2ceb4b6a98 improve ARM text about cache DB statistics 2019-08-12 10:16:08 +02:00
Matthijs Mekking 98b460e604 Add serve-stale test for ancient RRsets counters 2019-08-12 10:16:08 +02:00
Matthijs Mekking 1cd3516d54 Move dnssec_keyid_max out rrsettype counters enum 2019-08-12 10:16:08 +02:00
Matthijs Mekking 6e48abc503 Update CHANGES, notes 2019-08-12 10:16:08 +02:00
Matthijs Mekking a3af2c57e7 Make rbtdb maintain stale counters
When updating the statistics for RRset types, if a header is marked
stale or ancient, the appropriate statistic counters are decremented,
then incremented.

Also fix some out of date comments.
2019-08-12 10:16:08 +02:00
Matthijs Mekking 48332d4478 No longer have stale tracking in stats module
Having the decrement/increment logic in stats makes the code hard
to follow. Remove it here and adjust the unit test. The caller
will be responsible for maintaining the correct increments and
decrements for statistics counters (in the following commit).
2019-08-12 10:16:08 +02:00
Matthijs Mekking c9d56a8185 Print out ancient type stats with '~' prefix.
The stale RR types are now printed with '#'.  This used to be the
prefix for RR types that were marked ancient, but commit
df50751585 changed the meaning.  It is
probably better to keep '#' for stale RR types and introduce a new
prefix for reintroducing ancient type stat counters.
2019-08-12 10:16:08 +02:00
Michał Kępień 403cc1fa12 Merge branch '1110-clarify-relationship-between-acls-and-rpz' into 'master'
Clarify relationship between ACLs and RPZ

Closes #1110

See merge request isc-projects/bind9!2255
2019-08-12 03:50:18 -04:00
Michał Kępień 33bddbb5d1 Clarify relationship between ACLs and RPZ
In the ARM section about RPZ, add text explicitly stating that ACLs take
precedence over RPZ to prevent users from expecting RPZ actions to be
applied to queries coming from clients which are not permitted access to
the resolver by ACLs.
2019-08-12 09:46:34 +02:00
Evan Hunt ed10608663 Merge branch '7-remove-dlv-validation' into 'master'
Remove DLV validation code

Closes #7

See merge request isc-projects/bind9!2233
2019-08-09 12:40:52 -04:00
Evan Hunt d7461772bb CHANGES, release note 2019-08-09 09:22:05 -07:00
Matthijs MekkingandEvan Hunt 5ed13fe426 remove DLV from ARM 2019-08-09 09:22:05 -07:00
Evan Hunt efa5f7ed54 remove remaining DLV-related configuration checks 2019-08-09 09:22:05 -07:00
Evan Hunt 02d95d0b62 update docbook grammar, removing dnssec-looksaide
- this required modification to the code that generates grammar text for
  the documentation, because the "dnssec-lookaside" option spanned more
  than one line in doc/misc/options, so grepping out only the lines
  marked "// obsolete" didn't remove the whole option.  this commit adds
  an option to cfg_test to print named.conf clauses only if they don't
  have the obsolete, ancient, test-only, or not-yet-implemented flags
  set.
2019-08-09 09:18:46 -07:00
Evan Hunt 54de054dd5 mark 'dnssec-lookaside' obsolete in parser 2019-08-09 09:18:02 -07:00
Evan Hunt 2c87ab1cca remove DLV system tests 2019-08-09 09:18:02 -07:00
Evan Hunt f9c07c78bc remove DLV support from dnssec-signzone 2019-08-09 09:18:02 -07:00
Evan Hunt 3a19e9ea19 remove DLV support from dnssec-dsfromkey 2019-08-09 09:18:02 -07:00
Evan Hunt 0b2b6b2ed1 remove DLV support from dnssec-checkds 2019-08-09 09:18:02 -07:00
Evan Hunt a73350a210 remove DLV from dns_client API and lib/samples 2019-08-09 09:18:02 -07:00
Evan Hunt a00f1df736 remove DLV from delv 2019-08-09 09:15:10 -07:00
Evan Hunt 1d86b202ad remove DLV-related library code 2019-08-09 09:15:10 -07:00
Evan Hunt 6a51b66197 remove DLV from validator 2019-08-08 08:46:13 -07:00
Ondřej Surý 053a716ae0 Merge branch '1182-add-older-autoconf-pkg-config-compat-macros' into 'master'
Add PKG_CHECK_VAR and AS_VAR_COPY compat macros (Courtesy of ycflash)

Closes #1182

See merge request isc-projects/bind9!2246
2019-08-08 08:46:52 -04:00
Ondřej Surý d80b6ec879 Add PKG_CHECK_VAR and AS_VAR_COPY compat macros (Courtesy of ycflash) 2019-08-08 14:46:31 +02:00
Michał Kępień 0d20df220e Merge branch 'michal/implement-a-convenience-function-for-rndc-dumpdb' into 'master'
Implement a convenience function for "rndc dumpdb"

See merge request isc-projects/bind9!1967
2019-08-08 08:42:49 -04:00
Michał Kępień 4a8b3a8ac0 Use rndc_dumpdb() in the "sfcache" system test 2019-08-08 14:27:55 +02:00
Michał Kępień 52beeed444 Use rndc_dumpdb() in the "serve-stale" system test 2019-08-08 14:27:55 +02:00
Michał Kępień 443449863b Use rndc_dumpdb() in the "rndc" system test 2019-08-08 14:27:55 +02:00
Michał Kępień 44c0cc881f Use rndc_dumpdb() in the "dnssec" system test 2019-08-08 14:27:55 +02:00
Michał Kępień cbf32b901b Use rndc_dumpdb() in the "cookie" system test 2019-08-08 14:27:55 +02:00
Michał Kępień 22d5355782 Use rndc_dumpdb() in the "cacheclean" system test 2019-08-08 14:27:55 +02:00
Michał Kępień ab78e350dd Implement a convenience function for "rndc dumpdb"
Add a helper shell function, rndc_dumpdb(), which provides a convenient
way to call "rndc dumpdb" for a given server with optional additional
arguments.  Since database dumping is an asynchronous process, the
function waits until the dump is complete before returning, which
prevents false positives in system tests caused by inspecting the dump
before its preparation is finished.  The function also renames the dump
file before returning so that it does not get overwritten by subsequent
calls; this retains forensic data in case of an unexpected test failure.
2019-08-08 14:27:55 +02:00
Ondřej Surý 7fac94f589 Merge branch 'sparc-pause' into 'master'
configure.ac: autodetect 'pause' instruction presence on sparc

See merge request isc-projects/bind9!2243
2019-08-08 07:31:29 -04:00
Sergei TrofimovichandOndřej Surý a5ad6b16c5 configure.ac: autodetect 'pause' instruction presence on sparc
The change fixes the following build failure on sparc T3 and older CPUs:

```
sparc-unknown-linux-gnu-gcc ... -O2 -mcpu=niagara2 ... -c rwlock.c
{standard input}: Assembler messages:
{standard input}:398: Error: Architecture mismatch on "pause ".
{standard input}:398: (Requires v9e|v9v|v9m|m8; requested architecture is v9b.)
make[1]: *** [Makefile:280: rwlock.o] Error 1
```

`pause` insutruction exists only on `-mcpu=niagara4` (`T4`) and upper.

The change adds `pause` configure-time autodetection and uses it if available.
config.h.in got new `HAVE_SPARC_PAUSE` knob. Fallback is a fall-through no-op.

Build-tested on:

- sparc-unknown-linux-gnu-gcc (no `pause`, build succeeds)
- sparc-unknown-linux-gnu-gcc -mcpu=niagara4 (`pause`, build succeeds)

Reported-by: Rolf Eike Beer
Bug: https://bugs.gentoo.org/691708
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2019-08-08 07:15:04 -04:00
Evan Hunt d3506c9728 Merge branch 'each-mdig-multi-norrcomments' into 'master'
minor bugfix in mdig: when using +multi, +norrcomments was ignored

See merge request isc-projects/bind9!2208
2019-08-07 23:15:13 -04:00
Evan Hunt 93ad3eea90 added "mdig +multi +norrcomment" test; also fixed the flawed dig test 2019-08-07 19:55:20 -07:00
Evan Hunt edab51b420 minor bugfix in mdig: when using +multi, +norrcomments was ignored 2019-08-07 19:47:56 -07:00
Ondřej Surý 5d5cf12a85 Merge branch '1148-deadlock-hangs-named-v9_11-v9_14-master' into 'master'
Resolve "deadlock hangs named"

Closes #1148

See merge request isc-projects/bind9!2236
2019-08-07 07:02:16 -04:00
Ondřej Surý 4db3189de2 Have the dns_client hold a .references until all external references are removed
so that cleanup can all be done in dns_client_destroy().

(cherry picked from commit e80c4c3431)
(cherry picked from commit ebc48cda26)
2019-08-07 12:43:13 +02:00
Mark AndrewsandOndřej Surý b3cd04b95a Have the view hold a weakref until all external references are removed
so that cleanup can all be done in dns_view_weakattach().

(cherry picked from commit be8af3afb7)
(cherry picked from commit e394632703)
2019-08-07 12:43:12 +02:00
Ondřej Surý cd9bbe6dea lib/dns/resolver.c: Convert (dns_view_t *)->weakrefs to isc_refcount_t
There's a deadlock in BIND 9 code where (dns_view_t){ .lock } and
(dns_resolver_t){ .buckets[i].lock } gets locked in different order.  When
view->weakrefs gets converted to a reference counting we can reduce the locking
in dns_view_weakdetach only to cases where it's the last instance of the
dns_view_t object.

(cherry picked from commit a7c9a52c89)
(cherry picked from commit 232140edae)
2019-08-07 12:43:12 +02:00
Ondřej Surý f03aaaa6b5 Merge branch 'ondrej/flycheck-configuration-update' into 'master'
Update the flycheck configuration for gcc and cppcheck

See merge request isc-projects/bind9!2234
2019-08-07 04:13:18 -04:00
Ondřej Surý d883aab05f Update the flycheck configuration for gcc and cppcheck 2019-08-07 10:12:25 +02:00
Evan Hunt 48213633ce Merge branch '1170-dig-comments' into 'master'
Resolve "dig +nocomment still comments"

Closes #1170

See merge request isc-projects/bind9!2207
2019-08-06 00:55:46 -04:00
Evan Hunt 9679c8c20a clarify descriptions of comment-related options in dig usage and man page 2019-08-05 21:30:34 -07:00
Evan Hunt 6d50f7d924 always check 'printcmd' before printing cmdline message 2019-08-05 21:26:32 -07:00
Mark Andrews 451113b4a9 Merge branch '964-use-referral-ds-record-when-validating' into 'master'
Resolve "Use referral DS record when validating"

Closes #964

See merge request isc-projects/bind9!1755
2019-08-02 01:31:16 -04:00
Mark Andrews ac28cc14e1 add CHANGES 2019-08-02 15:09:42 +10:00
Mark Andrews 4293a2f4bf check that example/DS is not fetched when validating a.example 2019-08-02 15:09:42 +10:00
Mark Andrews 57a328d67e Store the DS and RRSIG(DS) with trust dns_trust_pending_answer
so that the validator can validate the records as part of validating
the current request.
2019-08-02 15:09:42 +10:00
Mark Andrews 954782d78a Merge branch '1175-a-race-in-ht-c-can-cause-require-failures' into 'master'
Resolve "a race in ht.c can cause REQUIRE failures"

Closes #1175

See merge request isc-projects/bind9!2225
2019-08-01 02:04:32 -04:00
Mark Andrews 49c31702bd add CHANGES 2019-08-01 16:03:55 +10:00
Mark Andrews 9cfd0ecccf remove invalid comment 2019-08-01 11:32:28 +10:00
Mark Andrews 9b10cfef56 keep rpzs around until everything referencing it has gone 2019-08-01 11:15:05 +10:00
Mark Andrews 53800281fe maintain a reference to 'rpz' when calling rpz.c:update_quantum 2019-08-01 09:30:49 +10:00
Ondřej Surý fefb2d2662 Merge branch 'michal/do-not-use-target-specific-variables-in-makefiles' into 'master'
Do not use target-specific variables in Makefiles and fix LD_WRAP for non-libtool builds

Closes #1174

See merge request isc-projects/bind9!2224
2019-07-31 10:48:46 -04:00
Ondřej Surý 37cccbab8d Fix the ${WRAP} -> $${WRAP} to allow static non-libtool linking again 2019-07-31 16:18:58 +02:00
Ondřej Surý 4302b4f3c4 Revert the target specific variable to fix building with BSD make 2019-07-31 16:05:02 +02:00
Ondřej Surý ae76cd086e Merge branch '4-remove-etags' into 'master'
Remove the autoconf checks for etags/ctags and `make tags` target

Closes #4

See merge request isc-projects/bind9!2223
2019-07-31 09:43:42 -04:00
Ondřej Surý 1d3ba54d6c Remove the autoconf checks for etags/ctags and make tags target
There's no strong reason to keep `make tags` in our build system.  The previous
functionality of `make tags` could be simply retained by aliasing variant of:

    etags $(git ls-files '*.c' '*.h')

which would be universal for all C-code projects.
2019-07-31 15:27:27 +02:00
Ondřej Surý 72bd0db6cf Merge branch '4-configure.ac-use-pkg-config-for-zlib' into 'master'
Convert the configure.ac rules for zlib library to use pkg-config

Closes #4

See merge request isc-projects/bind9!2222
2019-07-31 09:15:12 -04:00
Ondřej Surý 2b632a232f Convert the configure.ac rules for zlib library to use pkg-config 2019-07-31 14:54:40 +02:00
Mark Andrews aed7eb0c74 Merge branch '1159-bits-65-72-of-the-dns64-prefix-are-supposed-to-be-zero' into 'master'
Resolve "Bits 64..71 of the dns64 prefix are supposed to be zero"

Closes #1159

See merge request isc-projects/bind9!2193
2019-07-31 08:11:45 -04:00
Mark Andrews d95ae93dd3 add CHANGES 2019-07-31 21:51:11 +10:00
Mark Andrews a7ec7eb6ed check that bits 64..71 in a dns64 prefix are zero 2019-07-31 21:51:11 +10:00
Ondřej Surý 06d8b1071d Merge branch 'ondrej/cleanup-isc_thread-api' into 'master'
Cleanup the isc_thread API

See merge request isc-projects/bind9!2159
2019-07-31 06:09:45 -04:00
Ondřej Surý 46919579bb Make isc_thread_join() assert internally on failure
Previously isc_thread_join() would return ISC_R_UNEXPECTED on a failure to
create new thread.  All such occurences were caught and wrapped into assert
function at higher level.  The function was simplified to assert directly in the
isc_thread_join() function and all caller level assertions were removed.
2019-07-31 11:56:58 +02:00
Ondřej Surý d6a60f2905 Make isc_thread_create() assert internally on failure
Previously isc_thread_create() would return ISC_R_UNEXPECTED on a failure to
create new thread.  All such occurences were caught and wrapped into assert
function at higher level.  The function was simplified to assert directly in the
isc_thread_create() function and all caller level assertions were removed.
2019-07-31 11:56:58 +02:00
Michał Kępień e6de6deec9 Merge branch 'michal/wildcard-system-test-make-root-hints-consistent-with-authoritative-data' into 'master'
"wildcard" system test: make root hints consistent with authoritative data

See merge request isc-projects/bind9!2190
2019-07-31 05:43:17 -04:00
Michał Kępień dd430c3093 Make root hints consistent with authoritative data
Multiple resolvers in the "wildcard" system test are configured with a
single root hint: "ns.root-servers.nil", pointing to 10.53.0.1, which is
inconsistent with authoritative data served by ns1.  This may cause
intermittent resolution failures, triggering false positives for the
"wildcard" system test.  Prevent this from happening by making ns2, ns3,
and ns5 use root hints corresponding to the contents of ns1/root.db.in.
2019-07-31 11:06:34 +02:00
Ondřej Surý 6d069edb59 Merge branch '1123-remove-isc-config.sh' into 'master'
The BIND 9 libraries are now internal-only, so remove isc-config.sh

Closes #1123

See merge request isc-projects/bind9!2115
2019-07-31 05:04:00 -04:00
Ondřej Surý 4b44351e65 The BIND 9 libraries are now internal-only, so remove isc-config.sh
The isc-config.sh script was introduced before pkg-config as is a purely
historical thing.  There are two reason for removal of isc-config.sh scripts:

a) The BIND 9 libraries are now meant to be used only from BIND 9, so there's no
   reason to provide convenience script to link with the libraries.

b) Even if that was not the case, we should and would replace the isc-config.sh
   with respective pkg-config (.pc) file for every library.
2019-07-31 10:45:18 +02:00
Ondřej Surý 7c3430a24e Merge branch '1160-properly-use-isc_mem_putanddetach' into 'master'
Resolve "Replace the isc_mem_put(mctx, ...)+isc_mem_detach(&mctx) usage with isc_mem_putanddetach(&mctx)"

Closes #1160

See merge request isc-projects/bind9!2195
2019-07-31 04:39:40 -04:00
Ondřej Surý 44381929e2 We need to wrap isc__mem_putanddetach in tkey_test.c unit too now 2019-07-31 10:26:41 +02:00
Ondřej Surý a6dcdc535c Replace usage of isc_mem_put+isc_mem_detach with isc_mem_putanddetach
Using isc_mem_put(mctx, ...) + isc_mem_detach(mctx) required juggling with the
local variables when mctx was part of the freed object. The isc_mem_putanddetach
function can handle this case internally, but it wasn't used everywhere.  This
commit apply the semantic patching plus bit of manual work to replace all such
occurrences with proper usage of isc_mem_putanddetach().
2019-07-31 10:26:40 +02:00
Ondřej Surý d502569902 Add spatch to replace isc_mem_put+isc_mem_detach with isc_mem_putanddetach 2019-07-31 10:26:40 +02:00
Ondřej Surý b23c8aa5e8 Merge branch '1151-inconsistent-usage-of-stdout-vs-stderr-in-signing-tools' into 'master'
Resolve "Inconsistent usage of stdout vs stderr in signing tools"

Closes #1151

See merge request isc-projects/bind9!2165
2019-07-31 04:24:50 -04:00
Ondřej Surý e4144fb9cf Add CHANGES and release note 2019-07-31 10:05:52 +02:00
Evan HuntandOndřej Surý 664b8f04f5 add -q to getopt flags, and use newlines consistently with report() 2019-07-31 10:05:52 +02:00
Evan HuntandOndřej Surý 022649abc3 document -q option in dnssec-signzone and dnssec-verify man pages 2019-07-31 10:05:52 +02:00
Ondřej Surý fd00bac736 Add -q (quiet) option to dnssec-signzone and dnssec-verify tool
With the move of the normal output to stdout, we need a way how to silence the
extra output, so the signed file name can be captured in a simple way.  This
commit adds `-q` command line option that will silence all the normal output
that get's printed from both tools.
2019-07-31 10:05:52 +02:00
Ondřej Surý 94354d4655 Remove 2>&1 from the dnssec-signzone invocation in tests 2019-07-31 10:05:52 +02:00
Ondřej Surý ced15edea1 Change the zoneverify.c to print the information to user supplied function
The lib/dns/zoneverify.c output was hardwired to stderr, which was inconsistent
with lib/dns/dnssec.c.  This commit changes zoneverify.c to print the normal run
information to caller supplied function - same model as in the lib/dns/dnssec.c.
2019-07-31 10:05:52 +02:00
Ondřej Surý 90f4c1c5a2 Use stdout to print information about signing
Previously, the default output from the libdns library went to stderr by
default.  This was inconsistent with the rest of the output.  This commit
changes the default logging to go to stdout, with notable exception - when the
output of the signing process goes to stdout, the messages are printed to the
stderr.  This is consistent with other functions that output information about
the signing process - e.g. print_stats().
2019-07-31 10:05:51 +02:00
Michał Kępień 36ee99c5ee Merge branch 'michal/staticstub-system-test-make-root-hints-consistent-with-authoritative-data' into 'master'
"staticstub" system test: make root hints consistent with authoritative data

See merge request isc-projects/bind9!2161
2019-07-31 03:42:41 -04:00
Michał Kępień 4b5e1da0e3 Make root hints consistent with authoritative data
The ns2 named instance in the "staticstub" system test is configured
with a single root hint commonly used in BIND system tests
(a.root-servers.nil with an address of 10.53.0.1), which is inconsistent
with authoritative data served by ns1.  This may cause intermittent
resolution failures, triggering false positives for the "staticstub"
system test.  Prevent this from happening by making ns1 serve data
corresponding to the contents of bin/tests/system/common/root.hint.
2019-07-31 09:18:02 +02:00
Michał Kępień 51ec36c826 Merge branch 'michal/update-gitlab-ci-to-fedora-30' into 'master'
Update GitLab CI to Fedora 30

See merge request isc-projects/bind9!2196
2019-07-31 03:14:25 -04:00
Michał Kępień fac23cf939 Update GitLab CI to Fedora 30
Since Fedora 30 is the current Fedora release, replace Fedora 29 GitLab
CI jobs with their up-to-date counterparts.
2019-07-31 08:47:02 +02:00
Mark Andrews 7c210a2b3b Merge branch '1152-dig-expandaaaa-doesn-t-work-with-short' into 'master'
Resolve "dig +expandaaaa doesn't work with +short"

Closes #1152

See merge request isc-projects/bind9!2169
2019-07-30 21:40:49 -04:00
Mark Andrews b791ab542b add CHANGES 2019-07-31 11:09:32 +10:00
Mark Andrews 9836d5bc17 check that dig +short +expandaaaa works 2019-07-30 21:05:56 -04:00
Mark Andrews 2a047af31e set DNS_STYLEFLAG_EXPANDAAAA flag in say_message if appropriate 2019-07-30 21:05:56 -04:00
Mark Andrews 6f8d363514 Merge branch '1133-your-problem-or-cygwin-s' into 'master'
Resolve "Your problem or Cygwin's ?????"

Closes #1133

See merge request isc-projects/bind9!2137
2019-07-30 20:58:36 -04:00
Mark AndrewsandEvan Hunt 12d9681442 add CHANGES 2019-07-30 16:21:49 -07:00
Mark AndrewsandEvan Hunt 91a0cb5da3 handle connect() returning ETIMEDOUT on a non-blocking socket 2019-07-30 16:21:49 -07:00
Michał Kępień f30bdd1aac Merge branch '1171-alpine-linux-tweaks' into 'master'
Alpine Linux tweaks

Closes #1171

See merge request isc-projects/bind9!2204
2019-07-30 16:49:15 -04:00
Michał Kępień 326a334b49 Add Alpine Linux to GitLab CI
Ensure BIND is continuously tested on Alpine Linux as it is commonly
used as a base for Docker containers and employs a less popular libc
implementation, musl libc.
2019-07-30 21:25:18 +02:00
Michał Kępień f4daf6e0e7 Do not use legacy time zone names
"PST8PDT" is a legacy time zone name whose use in modern code is
discouraged.  It so happens that using this time zone with musl libc
time functions results in different output than for other libc
implementations, which breaks the lib/isc/tests/time_test unit test.
Use the "America/Los_Angeles" time zone instead in order to get
consistent output across all tested libc implementations.
2019-07-30 21:25:18 +02:00
Michał Kępień bb9c1654e2 Fix awk invocation in the "verify" system test
Appending output of a command to the same file as the one that command
is reading from is a dangerous practice.  It seems to have accidentally
worked with all the awk implementations we have tested against so far,
but for BusyBox awk, doing this may result in the input/output file
being written to in an infinite loop.  Prevent this from happening by
redirect awk output to a temporary file and appending its contents to
the original file in a separate shell pipeline.
2019-07-30 21:25:18 +02:00
Michał Kępień b10d28d1e0 Extend prerequisites for the "xfer" system test
The Net::DNS Perl module needs the Digest::HMAC module to support TSIG.
However, since the latter is not a hard requirement for the former, some
packagers do not make Net::DNS depend on Digest::HMAC.  If Net::DNS is
installed on a host but Digest::HMAC is not, the "xfer" system test
breaks in a very hard-to-debug way (ans5 returns TSIG RRs with empty
RDATA, which prevents TSIG-signed SOA queries and transfers from
working).  Prevent this from happening by making the "xfer" system test
explicitly require Digest::HMAC apart from Net::DNS.
2019-07-30 21:25:18 +02:00
Michał Kępień 266e3ed52a Make "digdelv" system test work with BusyBox sed
The BusyBox version of sed treats leading '\+' in a regular expression
to be matched as a syntax error ("Repetition not preceded by valid
expression"), which triggers false positives for the "digdelv" system
test.  Make the relevant sed invocations work portably across all sed
implementations by removing the leading backslash.
2019-07-30 21:25:18 +02:00
Michał Kępień ad008f7dbf Make "autosign" system test work with BusyBox awk
The BusyBox version of awk treats some variables which other awk
implementations consider to be decimal values as octal values.  This
intermittently breaks key event interval calculations in the "autosign"
system test, trigger false positives for it.  Prevent the problem from
happening by stripping leading zeros from the affected awk variables.
2019-07-30 21:25:18 +02:00
Michał Kępień 3384455659 Tweak buffer sizes to prevent compilation warnings
For some libc implementations, BUFSIZ is small enough (e.g. 1024 for
musl libc) to trigger compilation warnings about insufficient size of
certain buffers.  Since the relevant buffers are used for printing DNS
names, increase their size to '(n + 1) * DNS_NAME_FORMATSIZE', where 'n'
is the number of DNS names which are printed to a given buffer.  This
results in somewhat arbitrary, albeit nicely-aligned and large enough
buffer sizes.
2019-07-30 21:25:18 +02:00
Michał Kępień b5cd146033 Always include <errno.h> instead of <sys/errno.h>
Including <sys/errno.h> instead of <errno.h> raises a compiler warning
when building against musl libc.  Always include <errno.h> instead of
<sys/errno.h> to prevent that compilation warning from being triggered
and to achieve consistency in this regard across the entire source tree.
2019-07-30 21:25:18 +02:00
Michał Kępień 5381ac0fcc Unify header ordering in unit tests
Make sure all unit tests include headers in a similar order:

 1. Three headers which must be included before <cmocka.h>.
 2. System headers.
 3. UNIT_TESTING definition, followed by the <cmocka.h> header.
 4. libisc headers.
 5. Headers from other BIND libraries.
 6. Local headers.

Also make sure header file names are sorted alphabetically within each
block of #include directives.
2019-07-30 21:25:15 +02:00
Michał Kępień 59528d0e9d Include <sched.h> where necessary for musl libc
All unit tests define the UNIT_TESTING macro, which causes <cmocka.h> to
replace malloc(), calloc(), realloc(), and free() with its own functions
tracking memory allocations.  In order for this not to break
compilation, the system header declaring the prototypes for these
standard functions must be included before <cmocka.h>.

Normally, these prototypes are only present in <stdlib.h>, so we make
sure it is included before <cmocka.h>.  However, musl libc also defines
the prototypes for calloc() and free() in <sched.h>, which is included
by <pthread.h>, which is included e.g. by <isc/mutex.h>.  Thus, unit
tests including "dnstest.h" (which includes <isc/mem.h>, which includes
<isc/mutex.h>) after <cmocka.h> will not compile with musl libc as for
these programs, <sched.h> will be included after <cmocka.h>.

Always including <cmocka.h> after all other header files is not a
feasible solution as that causes the mock assertion macros defined in
<isc/util.h> to mangle the contents of <cmocka.h>, thus breaking
compilation.  We cannot really use the __noreturn__ or analyzer_noreturn
attributes with cmocka assertion functions because they do return if the
tested condition is true.  The problem is that what BIND unit tests do
is incompatible with Clang Static Analyzer's assumptions: since we use
cmocka, our custom assertion handlers are present in a shared library
(i.e. it is the cmocka library that checks the assertion condition, not
a macro in unit test code).  Redefining cmocka's assertion macros in
<isc/util.h> is an ugly hack to overcome that problem - unfortunately,
this is the only way we can think of to make Clang Static Analyzer
properly process unit test code.  Giving up on Clang Static Analyzer
being able to properly process unit test code is not a satisfactory
solution.

Undefining _GNU_SOURCE for unit test code could work around the problem
(musl libc's <sched.h> only defines the prototypes for calloc() and
free() when _GNU_SOURCE is defined), but doing that could introduce
discrepancies for unit tests including entire *.c files, so it is also
not a good solution.

All in all, including <sched.h> before <cmocka.h> for all affected unit
tests seems to be the most benign way of working around this musl libc
quirk.  While quite an ugly solution, it achieves our goals here, which
are to keep the benefit of proper static analysis of unit test code and
to fix compilation against musl libc.
2019-07-30 21:08:40 +02:00
Michał Kępień 03de34194d Merge branch 'michal/filter-aaaa-system-test-make-root-hints-consistent-with-authoritative-data' into 'master'
"filter-aaaa" system test: make root hints consistent with authoritative data

See merge request isc-projects/bind9!2057
2019-07-29 16:10:44 -04:00
Michał Kępień c19ebde14b Make root hints consistent with authoritative data
Resolvers in the "filter-aaaa" system test are configured with a single
root hint: "ns.rootservers.net", pointing to 10.53.0.1.  However,
querying ns1 for "ns.rootservers.net" results in NXDOMAIN answers.
Since the TTL for the root hint is set to 0, it may happen that a
resolver's ADB will be asked to return any known addresses for
"ns.rootservers.net", but it will only have access to a cached NXDOMAIN
answer for that name and an expired root hint, which will result in a
resolution failure, triggering a false positive for the "filter-aaaa"
system test.  Prevent this from happening by making all the root hints
consistent with authoritative data served by ns1.
2019-07-29 21:44:31 +02:00
Evan Hunt c14dc46319 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!2202
2019-07-25 22:05:03 -04:00
Evan Hunt 78da483941 placeholder 2019-07-25 22:04:29 -04:00
Ondřej Surý 73e615fcfa Merge branch '1030-statistics-channel-improvements-generated-files' into 'master'
Regenerate bind9.xsl.h

Closes #1030

See merge request isc-projects/bind9!2201
2019-07-25 21:43:52 -04:00
Ondřej Surý 36bc018275 Regenerate bind9.xsl.h 2019-07-25 21:31:47 -04:00
Matthijs Mekking e976db255f Merge branch 'matthijs-addzone-ignored-some-test-results' into 'master'
The 'addzone' test ignored some test results

See merge request isc-projects/bind9!2198
2019-07-25 11:03:40 -04:00
Matthijs Mekking 4b40266a1d The 'addzone' test ignored some test results 2019-07-25 16:30:20 +02:00
Ondřej Surý 8751585841 Merge branch '1030-statistics-channel-improvements' into 'master'
Statistics Channel Improvements

Closes #1030

See merge request isc-projects/bind9!1944
2019-07-25 08:22:32 -04:00
Mark AndrewsandOndřej Surý b8a96bfa78 add CHANGES 2019-07-25 08:03:10 -04:00
Mark AndrewsandOndřej Surý 570d1cf0bb use h?+script selectors 2019-07-25 08:03:10 -04:00
Mark AndrewsandOndřej Surý e6c13ebb26 toggle graph/counter pairs 2019-07-25 08:03:10 -04:00
Mark AndrewsandOndřej Surý 34ce90565c toggle graph/counter pairs 2019-07-25 08:03:10 -04:00
Timothe LittandOndřej Surý 86595ed8cb Make statistics tables (in HTML view) togglable
The HTML view of the statistics channel creates
pages with many long tables.  These can be difficult
to navigate.

This commit adds a "show/hide" toggle to each
heading, which makes it easy to compress/expand
the view.
2019-07-25 08:03:10 -04:00
Ondřej Surý d807ecde24 Merge branch 'ondrej/cleanup_isc_mem_get_failure_handling_blocks' into 'master'
Cleanup isc_mem_get() failure handling blocks

See merge request isc-projects/bind9!2155
2019-07-23 16:25:14 -04:00
Evan HuntandOndřej Surý a1871e7f1d further cleanup
- removed some dead code
- dns_zone_setdbtype is now void as it could no longer return
  anything but ISC_R_SUCCESS; calls to it no longer check for a result
- controlkeylist_fromconfig() is also now void
- fixed a whitespace error
2019-07-23 15:32:36 -04:00
Ondřej Surý 19eb5d0e83 Cleanup the failure handling in isc_mem_allocate 2019-07-23 15:32:36 -04:00
Ondřej Surý 9123da5362 Adjust tkey_test.c test to mock_assert() when there's no memory 2019-07-23 15:32:36 -04:00
Ondřej Surý f0c6aef542 Cleanup stray goto labels from removing isc_mem_allocate/strdup checking blocks 2019-07-23 15:32:36 -04:00
Ondřej Surý 9bdc24a9fd Use coccinelle to cleanup the failure handling blocks from isc_mem_strdup 2019-07-23 15:32:36 -04:00
Ondřej Surý 601cb4e4cc Use coccinelle to cleanup the failure handling blocks from isc_mem_allocate 2019-07-23 15:32:35 -04:00
Ondřej Surý 3c1d4298af Add spatch for isc_mem_allocate; it also cannot fail gracefully 2019-07-23 15:32:35 -04:00
Ondřej Surý 49f244406c Add spatch for isc_mem_strdup; it also cannot fail gracefully 2019-07-23 15:32:35 -04:00
Ondřej Surý ae83801e2b Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
Ondřej Surý f63e696967 Add semantic patch to remove checking for isc_mem_get() return value
The isc_mem_get() cannot fail gracefully now, it either gets memory of
assert()s.  The added semantic patch cleans all the blocks checking whether
the return value of isc_mem_get() was NULL.
2019-07-23 15:32:35 -04:00
Ondřej Surý 7f828a213c Revert to patch generating check-cocci script
The coccinelle and util/update_copyright script have different
idea about how the whitespace should look like.  Revert the script
to the previous version, so it doesn't mangle the files in place,
and deal with just whitespace changes.
2019-07-23 15:32:35 -04:00
Ondřej Surý 3bcd05f081 Merge branch 'ondrej/disable-LD_WRAP-without-libtool' into 'master'
Disable LD_WRAP tests when libtool is disabled

See merge request isc-projects/bind9!2192
2019-07-23 12:02:03 -04:00
Ondřej Surý 0cd1e5ed28 Disable LD_WRAP tests when libtool is disabled 2019-07-23 11:49:21 -04:00
Ondřej Surý 14a4a799c0 Merge branch 'ondrej/fix-LD_WRAP-Makefile' into 'master'
Fix the lib/dns/tests/Makefile.in to work without LD_WRAP

See merge request isc-projects/bind9!2188
2019-07-23 09:05:36 -04:00
Ondřej Surý b558346437 Fix the lib/dns/tests/Makefile.in to work without LD_WRAP 2019-07-23 08:59:36 -04:00
Ondřej Surý 14d10521ba Merge branch '1149-restore-locking-in-resume_dslookup' into 'master'
Restore locking in resume_dslookup()

Closes #1149

See merge request isc-projects/bind9!2184
2019-07-23 07:02:44 -04:00
Michał Kępień ca528766d6 Restore locking in resume_dslookup()
Commit 9da902a201 removed locking around
the fctx_decreference() call inside resume_dslookup().  This allows
fctx_unlink() to be called without the bucket lock being held, which
must never happen.  Ensure the bucket lock is held by resume_dslookup()
before it calls fctx_decreference().
2019-07-23 11:43:46 +02:00
Ondřej Surý dd358e6a21 Merge branch 'u/fanf2/arm-rrset-order-random' into 'master'
doc/arm: correct default for rrset-order

See merge request isc-projects/bind9!2146
2019-07-22 18:24:32 -04:00
Tony FinchandOndřej Surý bded8af7b8 doc/arm: correct default for rrset-order 2019-07-22 18:12:29 -04:00
Ondřej Surý 07b4859dec Merge branch '195-add-dnstap-builds-to-ci' into 'master'
Add dnstap builds to CI

Closes #195

See merge request isc-projects/bind9!2160
2019-07-22 17:48:27 -04:00
Michał KępieńandOndřej Surý 2bf44c6cd4 Add dnstap builds to CI
Ensure BIND with dnstap support enabled is being continuously tested by
adding --enable-dnstap to the ./configure invocation used for CentOS 7
and Debian sid builds in GitLab CI.
2019-07-22 17:35:46 -04:00
Ondřej Surý 673aa9f626 Merge branch 'each-fix-ld-wrap-test' into 'master'
Fix LD_WRAP test in configure

See merge request isc-projects/bind9!1806
2019-07-22 17:18:02 -04:00
Evan HuntandOndřej Surý 839ed7894b Make the symbol wrapping work with dynamic linking
When the unit test is linked with dynamic libraries, the wrapping
doesn't occur, probably because it's different translation unit.

To workaround the issue, we provide thin wrappers with *real* symbol
names that just call the mocked functions.
2019-07-22 17:16:51 -04:00
Ondřej Surý 135519e59a Fix the configure.ac and Makefile.in to correctly test for --wrap 2019-07-22 23:00:37 +02:00
Mark Andrews c808255682 Merge branch '1136-named-checkconf-should-report-missing-dnstap-output-option-when-dnstap-option-is-set' into 'master'
Resolve "named-checkconf should report missing dnstap-output option when dnstap option is set"

Closes #1136

See merge request isc-projects/bind9!2147
2019-07-22 15:28:08 -04:00
Mark Andrews a4f38bec6a named-checkconf failed to report dnstap-output missing
from named.conf when dnstap was specified
2019-07-23 05:09:01 +10:00
Mark Andrews b786171423 Merge branch '1106-interaction-between-dns64-and-rpz-can-cause-unexpected-results' into 'master'
Resolve "Interaction between dns64 and RPZ can cause unexpected results"

Closes #1106

See merge request isc-projects/bind9!2111
2019-07-22 14:33:52 -04:00
Mark Andrews b9a1c31df1 add CHANGES 2019-07-23 04:21:13 +10:00
Mark Andrews 1eb640049c Do not attempt to perform a DNS64 rewrite if RPZ returns NODATA. 2019-07-23 04:19:28 +10:00
Mark Andrews b9dc9b68cd Check that RPZ 'CNAME *.' (NODATA) works with DNS64. 2019-07-23 04:14:20 +10:00
Ondřej Surý 59a7f75b7e Merge branch 'michal/add-debian-buster-to-ci' into 'master'
Add Debian buster to CI

See merge request isc-projects/bind9!2162
2019-07-22 11:18:47 -04:00
Michał KępieńandOndřej Surý 5f71d9c6ac Add Debian buster to CI
Ensure BIND is continuously tested on Debian 10 (buster) as it is the
current stable Debian release.
2019-07-22 11:00:32 -04:00
Ondřej Surý fb40bc061f Merge branch '1149-fix-crashes-during-resolver-shutdown' into 'master'
Restore locking in dns_resolver_shutdown and dns_resolver_attach

Closes #1149

See merge request isc-projects/bind9!2164
2019-07-22 10:02:57 -04:00
Ondřej Surý a4141fcf98 Restore more locking in the lib/dns/resolver.c code
1. Restore locking in the fctx_decreference() code, because the insides of the
   function needs to be protected when fctx->references drops to 0.

2. Restore locking in the dns_resolver_attach() code, because two variables are
   accessed at the same time and there's slight chance of data race.
2019-07-22 09:03:27 -04:00
Ondřej Surý 317e36d47e Restore locking in dns_resolver_shutdown and dns_resolver_attach
Although the struct dns_resolver.exiting member is protected by stdatomics, we
actually need to wait for whole dns_resolver_shutdown() to finish before
destroying the resolver object.  Otherwise, there would be a data race and some
fctx objects might not be destroyed yet at the time we tear down the
dns_resolver object.
2019-07-22 08:17:36 -04:00
Ondřej Surý 0b8632e662 Merge branch '605-fixes' into 'master'
Fix missing siphash_test from Kyuafile and missing endian.h from MSVC build files

Closes #605

See merge request isc-projects/bind9!2173
2019-07-22 08:15:34 -04:00
Ondřej Surý 779aa2c9d9 Add siphash_test to lib/isc/tests/Kyuafile 2019-07-22 08:06:14 -04:00
Ondřej Surý 926f2dedbd Add endian.h to libisc.vcxproj.* files 2019-07-22 08:06:14 -04:00
Ondřej Surý 03b8e7ccb7 Merge branch '1153-fix-broken-atomics-on-windows' into 'master'
Fixup the increment vs decrement typo in lib/isc/win32/socket.c

Closes #1153

See merge request isc-projects/bind9!2172
2019-07-21 22:18:48 -04:00
Ondřej Surý 69e84ab9c1 Fixup the increment vs decrement typo in lib/isc/win32/socket.c 2019-07-21 22:05:24 -04:00
Ondřej Surý 51ec6f6500 Merge branch '605-add-siphash24-wpk' into 'master'
Synchronize the Cookie algorithm to SipHash-2-4 with other open-source DNS vendors

Closes #605

See merge request isc-projects/bind9!1788
2019-07-21 15:30:30 -04:00
Ondřej Surý 1711e61549 Add CHANGES note 2019-07-21 15:16:28 -04:00
Ondřej Surý eee6f51d05 Add release notes 2019-07-21 15:16:28 -04:00
Ondřej Surý a912f31398 Add new default siphash24 cookie algorithm, but keep AES as legacy
This commit changes the BIND cookie algorithms to match
draft-sury-toorop-dnsop-server-cookies-00.  Namely, it changes the Client Cookie
algorithm to use SipHash 2-4, adds the new Server Cookie algorithm using SipHash
2-4, and changes the default for the Server Cookie algorithm to be siphash24.

Add siphash24 cookie algorithm, and make it keep legacy aes as
2019-07-21 15:16:28 -04:00
Witold KręcickiandOndřej Surý afa81ee4e4 Remove all cookie algorithms but AES, which was used as a default, for legacy purposes. 2019-07-21 10:08:14 -04:00
Ondřej Surý 4e33942742 Merge branch 'ondrej/fix-leaked-memory-in-geoip_test.c' into 'master'
Fix leaked memory in geoip_test.c

See merge request isc-projects/bind9!2154
2019-07-16 12:55:01 -04:00
Ondřej Surý d1c7b79183 Fix the memory leaks in GeoIP unit test
Each individual test opened GeoIP databased but the database handles were never
closed.  This commit moves the open/close from the individual unit tests into
the _setup and _teardown methods where they really belong.
2019-07-16 15:35:34 +02:00
Ondřej Surý 4084ba1085 Merge branch 'ondrej/remove-mutexatomics-tests' into 'master'
Disable the mutexatomics tests from the regular CI (we could enable them on...

See merge request isc-projects/bind9!2150
2019-07-12 10:07:20 -04:00
Ondřej Surý 257b0456f1 Disable the mutexatomics tests from the regular CI (we could enable them on trigger or schedule in the future) 2019-07-12 16:01:01 +02:00
Ondřej Surý 00f9ed8f8b Merge branch 'ondrej/add-memcpy.spatch-and-fix-check-cocci-script' into 'master'
Add memcpy.spatch and fixup check-cocci script

See merge request isc-projects/bind9!2149
2019-07-12 09:59:25 -04:00
Ondřej Surý f3bcd1485f Don't cover the .spatch files with copyright 2019-07-12 15:45:07 +02:00
Ondřej Surý 9f916b000e Make util/check-cocci modify the files in place and be more verbose 2019-07-12 15:38:48 +02:00
Ondřej Surý 5b5930dca1 Remove #include <config.h> usage from siphash.c and siphash_test.c 2019-07-12 15:28:58 +02:00
Ondřej Surý dc234e3819 Replace the only memcpy usage with memmove 2019-07-12 15:28:00 +02:00
Ondřej Surý 7615e86fae Add spatch to replace memcpy usage with memmove 2019-07-12 15:27:06 +02:00
Ondřej Surý 5efc32ebae Fix the check-cocci script to scan bin lib fuzz dirs individually, as it was using only the last one 2019-07-12 15:26:48 +02:00
Tinderbox User 98eda76eb6 Merge branch 'prep-release' 2019-07-10 15:00:29 +00:00
Tinderbox User 2e637325ed prep 9.15.2 2019-07-10 14:59:47 +00:00
Witold Krecicki 4b4f33e676 Merge branch '1139-1952-breaks-windows-build' into 'master'
Resolve "!1952 Breaks Windows Build"

Closes #1139

See merge request isc-projects/bind9!2145
2019-07-10 09:18:23 -04:00
Witold Kręcicki 895eabd376 Fix Windows compilation issues with !1952, contributed by Thomas Jach 2019-07-10 12:31:39 +02:00
Witold Krecicki 3cf11418b5 Merge branch 'wpk-fix-compilation-error-statschannel' into 'master'
statschannel.c: declare dnssecsignstat_dump only if it's used (LIBXML2 or LIBJSON is available)

See merge request isc-projects/bind9!2143
2019-07-09 13:19:56 -04:00
Witold Kręcicki 111d08a6ad statschannel.c: declare dnssecsignstat_dump only if it's used (LIBXML2 or LIBJSON is available) 2019-07-09 18:08:49 +02:00
Witold Krecicki fcabb55942 Merge branch '1038-proper-atomics-use' into 'master'
Resolve "Make proper use of the atomics"

Closes #1038

See merge request isc-projects/bind9!1952
2019-07-09 11:14:49 -04:00
Witold Kręcicki db8acb4898 CHANGES 2019-07-09 16:11:14 +02:00
Witold Kręcicki dd7bd1c23f Add --enable-mutex-atomics build to CI 2019-07-09 16:11:14 +02:00
Witold Kręcicki e56cc07f50 Fix a few broken atomics initializations 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 81faafd508 lib/ns/stats.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 0471d1c1ce lib/isc/win32/socket.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki c0511688b5 lib/isc/task.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki f1471bc2e1 lib/isc/stats.c: Use ->references instead of ->refs 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki cbe8034dc8 lib/isc/quota.c: use proper acquire/release/relaxed memory order semantics 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 244ac0601f lib/isc/counter.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 81550c67da lib/dns/zt.c: use isc_refcount_t and atomics 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 3c30d095c4 lib/dns/tsig.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 2a57d0b00c lib/dns/ssu.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 38a973a33f lib/dns/sdlz.c:
- use isc_refcount_t
- properly detach from nodes so that we don't destroy objects
  that have non-zero references count
2019-07-09 16:10:53 +02:00
Ondřej SurýandWitold Kręcicki f3577e4635 lib/dns/sdb.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 9da902a201 lib/dns/resolver.c: use isc_refcount_t and atomics 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 6622c7a70a lib/dns/masterdump.c: use isc_refcount_t and atomics 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 1097a209e1 lib/dns/master.c: use isc_refcount_t and atomics 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 8a128151f9 lib/dns/lib.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 3dece71b91 lib/dns/nta.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki f5d3250d90 lib/dns/ecdb.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki d108e86cc8 lib/dns/dbtable.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Witold Kręcicki 757cff6644 lib/dns/cache.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Witold Kręcicki 44e2088449 dns/stats.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Witold Kręcicki de73904d03 lib/ns/client: use refcount_t for reference counting 2019-07-09 16:09:36 +02:00
Witold Kręcicki fc19182e97 lib/ns/lib.c: use isc_refcount_t for reference counting 2019-07-09 16:09:36 +02:00
Witold Kręcicki 92424e23fa Special, for-tests-only, mode with atomics emulated by a mutex-locked variable - useful for finding atomics congestions 2019-07-09 16:09:36 +02:00
Witold Kręcicki 5aeb99786e Properly initialize all atomic variables 2019-07-09 16:09:36 +02:00
Witold Kręcicki 3fcf98c8d3 isc/stats: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Witold Kręcicki 420f84f3f5 isc/timer: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Witold Kręcicki b56948743a lib/isc/task: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Witold Kręcicki 5d49f0ac39 dns/zt.c: use isc_refcount_t for reference counting 2019-07-09 16:09:36 +02:00
Witold Kręcicki c434cc69d7 interfacemgr: use isc_refcount_t for reference counting 2019-07-09 16:09:36 +02:00
Witold Kręcicki 5686c33068 Make portentry->refs an isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej Surý 8a83592e6a Merge branch 'ondrej/missing-ax_restore_flags-geoip2' into 'master'
Add missing AX_RESTORE_FLAGS([geoip2]) to configure.ac

See merge request isc-projects/bind9!2140
2019-07-09 08:20:45 -04:00
Ondřej Surý 5c0cc1ee8b Add missing AX_RESTORE_FLAGS([geoip2]) to configure.ac 2019-07-09 13:38:56 +02:00
Ondřej Surý 5570f6bbdc Merge branch 'ondrej-disable-freebsd-again' into 'master'
Disable FreeBSD Runner in the CI

See merge request isc-projects/bind9!2138
2019-07-08 09:36:28 -04:00
Ondřej Surý 747736d361 Disable FreeBSD Runner in the CI; it's broken again. 2019-07-08 15:28:28 +02:00
Evan Hunt 2f9ae94296 Merge branch '1112-remove-legacy-geoip' into 'master'
Resolve "Remove legacy GeoIP support in 9.15 after GeoIP2 is merged"

Closes #1112

See merge request isc-projects/bind9!2102
2019-07-04 12:38:26 -04:00
Ondřej SurýandEvan Hunt a2e89ff0c1 Get rid of DNS_GEOIP_DATABASE_INIT explicit initializer for geoip dbs
Instead of the explicit struct initializer with all member, rely on the fact
that static variables are explicitly initialized to 0 if not explicitly
initialized.
2019-07-04 08:58:26 -07:00
Evan Hunt 1957bcaa99 remove --with-geoip and change --without-geoip2 to --disable-geoip in CI 2019-07-04 08:58:26 -07:00
Thomas JachandEvan Hunt 9ba3e3f1b5 convert geoip to geoip2 in win32utils/Configure 2019-07-04 08:58:26 -07:00
Evan Hunt 3781448c89 use configure --enable-geoip to turn on GeoIP2
- instead of --with-geoip2, use --enable-geoip to turn on the GeoIP
  feature
- --with-maxminddb can be used to set the prefix for maxminddb
2019-07-04 08:58:25 -07:00
Evan Hunt 55cca87d8a add CHANGES note; remove references to legacy GeoIP from documentation 2019-07-04 08:58:20 -07:00
Evan Hunt 787f2a7e03 remove all support for legacy GeoIP 2019-07-04 08:56:45 -07:00
Matthijs Mekking c01679142a Merge branch '7-matthijs-deprecate-dnssec-lookaside' into 'master'
Deprecate dnssec-lookaside option

Closes #7

See merge request isc-projects/bind9!2104
2019-07-04 08:51:32 -04:00
Evan HuntandMatthijs Mekking 77c2a8bcbd remove spurious commas from docbook 2019-07-04 14:15:07 +02:00
Matthijs Mekking d1503cbfa2 Deprecate dnssec-lookaside option
Add the CFG_CLAUSEFLAG_DEPRECATED flag to the option so that people are
discouraged from using DLV.
2019-07-04 14:14:28 +02:00
Ondřej Surý 4cacdcc15b Merge branch 'ondrej/kyua.result-location' into 'master'
Use $KYUA_RESULT in kyua report-html invocation for unified file location

See merge request isc-projects/bind9!2127
2019-07-03 13:17:25 -04:00
Ondřej Surý f56b88f72e Set number of parallel jobs in .gitlab-ci.yml 2019-07-03 19:16:55 +02:00
Ondřej Surý a2a69725ef Use $KYUA_RESULT in kyua report-html invocation for unified file location 2019-07-03 19:16:55 +02:00
Evan Hunt ab7036488e Merge branch '1114-windows-build-broken' into 'master'
fix broken windows build

Closes #1114

See merge request isc-projects/bind9!2110
2019-07-03 12:53:18 -04:00
Evan Hunt 81fcde5953 fix broken windows build
The MSVS C compiler requires every struct to have at least one member.
The dns_geoip_databases_t structure had one set of members for
HAVE_GEOIP and a different set for HAVE_GEOIP2, and none when neither
API is in use.

This commit silences the compiler error by moving the declaration of
dns_geoip_databases_t to types.h as an opaque reference, and commenting
out the contents of geoip.h when neither version of GeoIP is enabled.
2019-07-03 12:17:27 -04:00
Ondřej Surý f7f4eef5c5 Merge branch 'michal/define-ATOMIC_VAR_INIT-on-windows' into 'master'
Define ATOMIC_VAR_INIT() on Windows

See merge request isc-projects/bind9!2125
2019-07-03 11:58:34 -04:00
Michał Kępień df42771a54 Define ATOMIC_VAR_INIT() on Windows
Commit b104a9bc50 introduced unconditional
use of the ATOMIC_VAR_INIT() macro in bin/dnssec/dnssec-signzone.c even
though that macro is only defined on Unix platforms.  Define it on
Windows systems as well in order to prevent build failures.
2019-07-03 14:27:53 +02:00
Ondřej Surý 590362fa48 Merge branch '1026-make-dnssec-signzone-thread-sanitizer-clean' into 'master'
Resolve "Make dnssec-signzone ThreadSanitizer clean"

Closes #1026

See merge request isc-projects/bind9!1938
2019-07-03 00:20:57 -04:00
Ondřej SurýandOndřej Surý 00807c03af Protect global init_count variable in rbtdb.c by making it atomic 2019-07-03 00:05:34 -04:00
Ondřej SurýandOndřej Surý b104a9bc50 bin/dnssec/dnssec-signzone.c: Protect global variables by making them atomic
Both global shuttingdown and finished bool variables were prone to data race
(as reported by ThreadSanitizer).  The commit makes them both atomic.
2019-07-03 00:05:34 -04:00
Ondřej SurýandOndřej Surý 49462cf974 Make isc_rwlock.c thread-safe
The ThreadSanitizer found several possible data races in our rwlock
implementation.  This commit changes all the unprotected variables to atomic and
also changes the explicit memory ordering (atomic_<foo>_explicit(..., <order>)
functions to use our convenience macros (atomic_<foo>_<order>).
2019-07-03 00:05:34 -04:00
Mark AndrewsandOndřej Surý 7c95192691 Define ATOMIC_VAR_INIT in isc/stdatomic.h shim 2019-07-03 00:05:34 -04:00
Ondřej SurýandOndřej Surý 570f358252 Add atomic_compare_exchange_strong_relaxed convenience macro 2019-07-03 00:05:34 -04:00
Ondřej Surý 99d4339093 Merge branch 'ondrej/with-or-without-geoip' into 'master'
Enable GeoIP2 for all builds and enable old GeoIP only for Debian amd64 stretch build

See merge request isc-projects/bind9!2120
2019-07-02 15:08:47 -04:00
Ondřej SurýandOndřej Surý 9c509c2684 Enable GeoIP2 for all builds and enable old GeoIP only for Debian jessie and Ubuntu xenial builds 2019-07-02 14:53:21 -04:00
Ondřej Surý f55e4c878b Merge branch 'ondrej/missing-dot-in-job' into 'master'
Add missing dot in .autoconf job template that caused duplicate job

See merge request isc-projects/bind9!2121
2019-07-02 14:22:55 -04:00
Ondřej Surý 3128bd96f7 Add missing dot in .autoconf job template that caused duplicate job 2019-07-02 20:07:02 +02:00
Ondřej Surý 6dad6b57c0 Merge branch 'ondrej/restore-freebsd-runner' into 'master'
Restore the FreeBSD Runner

See merge request isc-projects/bind9!2117
2019-07-02 13:39:49 -04:00
Ondřej Surý e957825eee Use $(pwd) instead of $CI_PROJECT_DIR to always get absolute path 2019-07-02 15:41:08 +02:00
Ondřej Surý 4d3e7d0b7d Use sudo to setup the interfaces when CI job is not running as root 2019-07-02 15:41:08 +02:00
Evan HuntandOndřej Surý 646bb64246 Add FreeBSD 11 GitLab CI Runner 2019-07-02 14:23:37 +02:00
Ondřej Surý 4ae2713640 Merge branch 'ondrej/fix-freebsd-make' into 'master'
Add rules to make sure subdirs are always built before testdirs

See merge request isc-projects/bind9!2116
2019-07-02 06:58:27 -04:00
Ondřej Surý 723433cbc6 Add rules to make sure subdirs are always built before testdirs 2019-07-02 12:32:22 +02:00
Ondřej Surý 1fe0c51f9b Merge branch '1120-remove-so_bsdcompat-usage' into 'master'
Resolve "Remove SO_BSDCOMPAT usage"

Closes #1120

See merge request isc-projects/bind9!2113
2019-07-01 11:12:47 -04:00
Ondřej Surý 9dd11ee258 Add CHANGES note:
5261.  [cleanup]       Remove SO_BSDCOMPAT socket option usage.
2019-07-01 16:19:01 +02:00
Ondřej Surý 209b2e53d1 Remove SO_BSDCOMPAT usage, it's ignore since Linux 2.4
The SO_BSDCOMPAT socket option is no-op since Linux 2.4, see the manpage:

SO_BSDCOMPAT
	Enable BSD bug-to-bug compatibility.  This is used by the UDP protocol
	module in Linux 2.0 and 2.2.  If enabled, ICMP errors received for a UDP
	socket will not be passed to the user program.  In later kernel
	versions, support for this option has been phased out: Linux 2.4
	silently ignores it, and Linux 2.6 generates a kernel warning (printk())
	if a program uses this option.  Linux 2.0 also enabled BSD bug-to-bug
	compatibility options (random header changing, skipping of the broadcast
	flag) for raw sockets with this option, but that was removed in Linux
	2.2.
2019-07-01 16:16:40 +02:00
Matthijs Mekking 1eeda8cd23 Merge branch 'managed-keys-is-deprecated' into 'master'
Mark some managed-keys instances deprecated

See merge request isc-projects/bind9!2105
2019-07-01 04:53:16 -04:00
Matthijs MekkingandMatthijs Mekking a5dc24b25a Mark some managed-keys instances deprecated
The 'managed-keys' (and 'trusted-keys') options have been deprecated
by 'dnssec-keys'.  Some documentation references to 'managed-keys'
had not yet been marked or noted as such.
2019-07-01 10:31:33 +02:00
Michał Kępień 4c0e9d0bdf Merge branch 'michal/add-and-use-keyfile_to_key_id-helper-function' into 'master'
Add and use keyfile_to_key_id() helper function

See merge request isc-projects/bind9!2087
2019-06-28 08:33:29 -04:00
Michał Kępień 7d6eaad1bd Add and use keyfile_to_key_id() helper function
When trying to extract the key ID from a key file name, some test code
incorrectly attempts to strip all leading zeros.  This breaks tests when
keys with ID 0 are generated.  Add a new helper shell function,
keyfile_to_key_id(), which properly handles keys with ID 0 and use it in
test code whenever a key ID needs to be extracted from a key file name.
2019-06-28 14:05:04 +02:00
Michał Kępień f895e4aaf2 Merge branch '1093-dnstap-read-clear-buffer-before-expanding-it' into 'master'
dnstap-read: clear buffer before expanding it

Closes #1093

See merge request isc-projects/bind9!2049
2019-06-28 07:08:35 -04:00
Michał Kępień 7354207e1b Add CHANGES entry
5260.	[bug]		dnstap-read was producing malformed output for large
			packets. [GL #1093]
2019-06-28 12:43:59 +02:00
Michał Kępień 3549abe81d dnstap-read: clear buffer before expanding it
When printing a packet, dnstap-read checks whether its text form takes
up more than the 2048 bytes allocated for the output buffer by default.
If that is the case, the output buffer is automatically expanded, but
the truncated output is left in the buffer, resulting in malformed data
being printed.  Clear the output buffer before expanding it to prevent
this issue from occurring.
2019-06-28 12:43:51 +02:00
Matthijs Mekking 1dfdedf137 Merge branch '1101-matthijs-checkconf-i' into 'master'
named-checkconf -i: ignore deprecate warnings

Closes #1101

See merge request isc-projects/bind9!2079
2019-06-28 05:50:40 -04:00
Matthijs Mekking 0b8790967e named-checkconf -i: ignore deprecate warnings
Adds a new option to named-checkconf, -i.  If set, named-checkconf
will not warn you about deprecated options.  This allows people
to use named-checkconf in automated deployment precoesses where an
operator only cares if their conf is valid, even if it is not optimal.

This was added as a request as part of introducing a policy on
removing named.conf options.
2019-06-28 11:02:59 +02:00
Evan Hunt 2890c98d4e Merge branch 'each-missing-dbtype' into 'master'
accidentally omitted region from valid dbtypes

See merge request isc-projects/bind9!2100
2019-06-27 23:41:05 -04:00
Evan Hunt 363e6319b7 accidentally omitted region from valid dbtypes 2019-06-27 16:38:21 -07:00
Evan Hunt 11aedb1fae Merge branch '182-geoip2-api' into 'master'
Resolve "Update GeoIP support to new API (GeoLite2 from Maxmind)"

Closes #182

See merge request isc-projects/bind9!2031
2019-06-27 18:12:04 -04:00
Evan Hunt 8854e284fd CHANGES, release note, README 2019-06-27 14:59:14 -07:00
Evan Hunt c9945d6148 update ARM documentation 2019-06-27 14:59:13 -07:00
Evan Hunt 9a1caf99ef add geoip2 system test 2019-06-27 14:59:13 -07:00
Evan Hunt 6399a70cb4 add GeoIP2 lookups to unit test 2019-06-27 14:59:09 -07:00
Evan Hunt 6e0b93e5a0 implement searching of geoip2 database
- revise mapping of search terms to database types to match the
  GeoIP2 schemas.
- open GeoIP2 databases when starting up; close when shutting down.
- clarify the logged error message when an unknown database type
  is configured.
- add new geoip ACL subtypes to support searching for continent in
  country databases.
- map geoip ACL subtypes to specific MMDB database queries.
- perform MMDB lookups based on subtype, saving state between
  queries so repeated lookups for the same address aren't necessary.
2019-06-27 14:59:03 -07:00
Evan Hunt fe46d5bc34 add HAVE_GEOIP2 #ifdef branches, without implementing yet 2019-06-27 14:58:14 -07:00
Evan Hunt fea6b5bf10 add a search for GeoIP2 libraries in configure
- "--with-geoip" is used to enable the legacy GeoIP library.
- "--with-geoip2" is used to enable the new GeoIP2 library
  (libmaxminddb), and is on by default if the library is found.
- using both "--with-geoip" and "--with-geoip2" at the same time
  is an error.
- an attempt is made to determine the default GeoIP2 database path at
  compile time if pkg-config is able to report the module prefix. if
  this fails, it will be necessary to set the path in named.conf with
  geoip-directory
- Makefiles have been updated, and a stub lib/dns/geoip2.c has been
  added for the eventual GeoIP2 search implementation.
2019-06-27 14:58:13 -07:00
Ondřej Surý cc1292d694 Merge branch '1095-when-gnu-c-compiler-is-used-on-solaris-gnu-ld-must-be-used' into 'master'
Enforce usage -zrelax=transtls when GNU C Compiler is used on Solaris

Closes #1095

See merge request isc-projects/bind9!2053
2019-06-27 07:29:13 -04:00
Ondřej SurýandWitold Krecicki d584223653 Enforce usage -zrelax=transtls when GNU C Compiler is used on Solaris
When GNU C Compiler is used on Solaris (11), the Thread Local Storage
is completely broken.  The behaviour doesn't manifest when GNU ld is
used.  Thus, we need to enforce usage of GNU ld when GNU C Compiler is
the compiler of choice.

For more background for this change, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90912
2019-06-27 04:18:44 -04:00
Mark Andrews 95a8e42e57 Merge branch '1030-statistics-channel-fixes' into 'master'
Statistics Channel Fixes

Closes #1030

See merge request isc-projects/bind9!1945
2019-06-26 23:20:16 -04:00
Mark AndrewsandEvan Hunt f8b3aa97df add CHANGES 2019-06-26 14:03:53 -07:00
Mark AndrewsandEvan Hunt d5c795942f check xsl vs xml 2019-06-26 14:03:53 -07:00
Evan Hunt ce3907e9fe add odd/even shading to the remaining tables 2019-06-26 14:01:41 -07:00
Mark AndrewsandEvan Hunt eaba8dd799 remove 'Configured Zones'; add even/odd to zone list 2019-06-26 13:31:58 -07:00
Timothe LittandEvan Hunt 96f0bbd4d5 Fix ISC-Bugs 45340: Statschannel XSL for zones, Traffic
In ISC-Bugs 45340, I wrote:

The Statistics channel offers links to Zones and Traffic.
Both produce valid data, but display as blank pages with
a web browser.

Zones never had XSL (I provided the original
implementation, but punted on the XSL).

Traffic has XSL, but it wasn't updated to reflect the
split between IPv4 and IPv6 data.

I've picked up enough XSL to fix my original omission,
and as penance for my sloth, fixed the Traffic bug as well.
2019-06-26 13:31:58 -07:00
Ondřej Surý d02f807a24 Merge branch '1068-make-libxml2-library-usage-opaque-fixup' into 'master'
Fix printing whether libxml2 is used in the report part of configure.ac

Closes #1068

See merge request isc-projects/bind9!2088
2019-06-26 12:41:48 -04:00
Ondřej Surý cdace7cac1 Fix printing whether libxml2 is used in the report part of configure.ac 2019-06-26 18:21:24 +02:00
Evan Hunt e6ef64c385 Merge branch '1092-allow-priming-glue' into 'master'
allow glue in authoritative responses to root priming queries

Closes #1092

See merge request isc-projects/bind9!2045
2019-06-26 12:15:00 -04:00
Evan Hunt 03a6a78b55 CHANGES, release note 2019-06-26 08:54:07 -07:00
Evan Hunt 9a1f0ea873 add system test to confirm glue is returned in priming queries 2019-06-26 08:53:42 -07:00
Evan Hunt e7684c7b64 allow glue in authoritative responses to root priming queries
- when processing authoritative queries for ./NS, set 'gluedb' so
  that glue will be included in the response, regardless of how
  'minimal-responses' has been configured.
2019-06-26 08:53:42 -07:00
Evan Hunt 2c370d93b4 Merge branch '1109-inline-reload-error' into 'master'
don't overwrite the dns_master_loadfile() result before calling zone_postload()

Closes #1109

See merge request isc-projects/bind9!2084
2019-06-26 11:45:13 -04:00
Evan Hunt c29e344f07 CHANGES 2019-06-26 08:26:32 -07:00
Evan Hunt e48b3f1a00 add a test that reloading errors are not ignored 2019-06-26 08:26:32 -07:00
Evan Hunt 0b792bd37b don't overwrite the dns_master_loadfile() result before calling zone_postload()
if "rndc reload" fails, the result code is supposed to be passed to
zone_postload, but for inline-signing zones, the result can be
overwritten first by a call to the ZONE_TRYLOCK macro. this can lead
to the partially-loaded unsigned zone being synced over to the signed
zone instead of being rejected.
2019-06-26 08:26:32 -07:00
Michał Kępień be492cf28d Merge branch 'michal/prevent-idna-test-failures-with-libidn2-2.2.0' into 'master'
Prevent "idna" test failures with libidn2 2.2.0+

See merge request isc-projects/bind9!2089
2019-06-26 09:00:52 -04:00
Michał Kępień 60ce0ed411 Prevent "idna" test failures with libidn2 2.2.0+
libidn2 2.2.0+ parses Punycode more strictly than older versions and
thus "dig +idnin +noidnout xn--19g" fails with libidn2 2.2.0+ but
succeeds with older versions.

We could preserve the old behavior by using the IDN2_NO_ALABEL_ROUNDTRIP
flag available in libidn2 2.2.0+, but:

  - this change in behavior is considered a libidn2 bug fix [1],
  - we want to make sure dig behaves as expected, not libidn2,
  - implementing that would require additional configure.ac cruft.

Removing the problematic check appears to be the simplest solution as it
does not prevent the relevant block of checks in the "idna" system test
from achieving its purpose, i.e. ensuring dig properly handles invalid
U-labels.

[1] see upstream commit 241e8f486134793cb0f4a5b0e5817a97883401f5
2019-06-26 14:20:17 +02:00
Michał Kępień 8ab398a90d Merge branch '1108-include-stdlib.h-in-lib-dns-dnsrps.c' into 'master'
Include <stdlib.h> in lib/dns/dnsrps.c

Closes #1108

See merge request isc-projects/bind9!2085
2019-06-26 05:06:54 -04:00
Michał Kępień 6cfcc6e8a2 Include <stdlib.h> in lib/dns/dnsrps.c
Since commit 0771dd3be8, <isc/mem.h> no
longer includes <isc/xml.h>.  On some systems (e.g. FreeBSD), this means
that no header included by lib/dns/dnsrps.c (and no header included by
those headers) contains a definition of free() any more, which triggers
a compiler warning as lib/dns/dnsrps.c calls that function.  Add the
missing #include directive to prevent that warning from being triggered.
2019-06-26 08:45:23 +02:00
Michał Kępień 42013c43f3 Merge branch 'michal/remove-nonexistent-function-from-libdns.def.in' into 'master'
Remove nonexistent function from libdns.def.in

See merge request isc-projects/bind9!2083
2019-06-26 01:53:10 -04:00
Michał Kępień f1c236d95d Remove nonexistent function from libdns.def.in
No function called dns_dnssecsignstats_decrement() actually exists.
Putting it into lib/dns/win32/libdns.def.in breaks at least some Windows
builds.  Remove the nonexistent function from that file.
2019-06-25 22:27:01 +02:00
Michał Kępień 97543354d2 Merge branch 'michal/wait-for-outgoing-transfer-statistics-to-be-logged' into 'master'
Wait for outgoing transfer statistics to be logged

See merge request isc-projects/bind9!2081
2019-06-25 16:15:19 -04:00
Michał Kępień 9fc5e48b14 Wait for outgoing transfer statistics to be logged
Since the message confirming outgoing transfer completion is logged
asynchronously, it may happen that transfer statistics may not yet be
logged by the time the dig command triggering a given transfer returns.
This causes false positives for the "ixfr" and "xfer" system tests.
Prevent this from happening by checking outgoing transfer statistics up
to 10 times, in 1-second intervals.
2019-06-25 21:41:42 +02:00
Ondřej Surý 955732d29c Merge branch '4-rename-OPENSSL_INCLUDES-to-OPENSSL_CFLAGS' into 'master'
Rename OPENSSL_INCLUDES to OPENSSL_CFLAGS in AX_CHECK_OPENSSL() macro

See merge request isc-projects/bind9!2073
2019-06-25 07:10:08 -04:00
Ondřej Surý 5d1e7be582 Rename OPENSSL_INCLUDES to OPENSSL_CFLAGS in AX_CHECK_OPENSSL() macro
The ax_check_openssl m4 macro used OPENSSL_INCLUDES.  Rename the
subst variable to OPENSSL_CFLAGS and wrap AX_CHECK_OPENSSL() in
action-if-not-found part of PKG_CHECK_MODULE check for libcrypto.
2019-06-25 12:36:01 +02:00
Ondřej Surý 32fc6c85f4 Merge branch '1068-make-libxml2-library-usage-opaque' into 'master'
Make the usage of json-c and libxml2 libraries opaque to the caller

Closes #1104 and #1068

See merge request isc-projects/bind9!2074
2019-06-25 06:23:15 -04:00
Ondřej Surý 9badc4dc90 Explicitly enable --with-libxml2 and --with-json-c to test whether pkg-config way works 2019-06-25 12:04:20 +02:00
Ondřej Surý e3e6888946 Make the usage of json-c objects opaque to the caller
The json-c have previously leaked into the global namespace leading
to forced -I<include_path> for every compilation unit using isc/xml.h
header.  This MR fixes the usage making the caller object opaque.
2019-06-25 12:04:20 +02:00
Ondřej Surý 0771dd3be8 Make the usage of libxml2 opaque to the caller
The libxml2 have previously leaked into the global namespace leading
to forced -I<include_path> for every compilation unit using isc/xml.h
header.  This MR fixes the usage making the caller object opaque.
2019-06-25 12:01:32 +02:00
Matthijs Mekking 11db639945 Merge branch '513-matthijs-dnssec-sign-stats' into 'master'
Resolve "New metrics to report DNSSEC signing operations and IXFRs [ISC-support #13431]"

Closes #513

See merge request isc-projects/bind9!2067
2019-06-25 05:59:28 -04:00
Matthijs MekkingandMatthijs Mekking 3a3f40e372 DNSSEC sign metrics: CHANGES, doc, release note
Add some information about the new statistic-channel DNS sign
metrics. Also add a CHANGES and release note entry.
2019-06-25 11:40:36 +02:00
Matthijs MekkingandMatthijs Mekking 6f67546cd6 Also collect DNSSEC refresh signature statistics
In addition to gather how many times signatures are created per
key in a zone, also count how many of those signature creations are
because of DNSSEC maintenance.  These maintenance counters are
incremented if a signature is refreshed (but the RRset did not
changed), when the DNSKEY RRset is changed, and when that leads
to additional RRset / RRSIG updates (for example SOA, NSEC).
2019-06-25 11:40:01 +02:00
Matthijs MekkingandMatthijs Mekking a8750a8805 Add tests for DNSSEC sign statistics
This adds tests to the statschannel system test for testing if
the dnskey sign operation counters are incremented correctly.

It tests three cases:

1. A zone maintenance event where all the signatures that are about
   to expire are resigned.
2. A dynamic update event where the new RR and other relevant records
   (SOA, NSEC) are resigned.
3. Adding a standby key, that means the DNSKEY and SOA RRset are
   resigned.
2019-06-25 11:40:01 +02:00
Matthijs MekkingandMatthijs Mekking 312fa7f65e Update dnskey sign operations statistics
Update per key tag the stats counter when it creates a new signature.
This can happen upon a dynamic update, or when doing DNSSEC
maintenance.
2019-06-25 11:40:01 +02:00
Matthijs MekkingandMatthijs Mekking d8cf7aedfa Add DNSSEC sign operations statistics channel
Add a new statistics structure to record how many sign operations
a key has made within a zone.
2019-06-25 11:40:01 +02:00
Mark Andrews e317a675a1 Merge branch 'marka-silence-unchecked-return' into 'master'
silence unchecked return

See merge request isc-projects/bind9!2039
2019-06-24 20:13:24 -04:00
Mark Andrews 134248531c silence unchecked return 2019-06-24 19:50:43 -04:00
Mark Andrews 2b5615b9d7 Merge branch '1098-compile-failure-on-9-11-8-master' into 'master'
Resolve "Compile failure on 9.11.8"

See merge request isc-projects/bind9!2075
2019-06-24 19:48:34 -04:00
Mark Andrews f77d5599ec add CHANGES
(cherry picked from commit 5c23623094)
2019-06-25 09:48:05 +10:00
Mark Andrews 79eed4e5c6 define ULLONG_MAX if not already defined
(cherry picked from commit 4110b9184d)
2019-06-25 09:47:24 +10:00
Evan Hunt 7d499f8fb8 Merge branch 'u/fanf2/rndc-missing-newline' into 'master'
When a server reload fails, print a note in `rndc status`.

See merge request isc-projects/bind9!2040
2019-06-24 15:35:00 -04:00
Mark AndrewsandEvan Hunt 42173037ee add CHANGES 2019-06-24 11:50:30 -07:00
Tony FinchandEvan Hunt 8e05e2e9d5 When a server reload fails, print a note in rndc status.
After a failed reload I noticed two problems:

* There was a missing newline in the output of `rndc status` so it
  finished "reload/reconfig in progressserver is up and running"
* The "reconfig in progress" note should have said "reconfig failed"
2019-06-24 11:49:48 -07:00
Mark Andrews e0dd3757cb Merge branch 'marka-wait-for-zones-to-load' into 'master'
wait for zones to load

See merge request isc-projects/bind9!2027
2019-06-23 21:54:57 -04:00
Mark Andrews b62e6418b5 wait for zones to load 2019-06-23 21:37:37 -04:00
Ondřej Surý 41915e88cd Merge branch '4-remove-libbind-from-configure' into 'master'
Remove the noop warning when using --with-libbind from configure.ac

See merge request isc-projects/bind9!2069
2019-06-21 13:16:59 -04:00
Ondřej Surý 77db0cb929 Remove the noop warning when using --with-libbind from configure.ac
The configure option --with-libbind was already obsolete, this MR
just removes the warning from configure.ac.
2019-06-21 19:03:01 +02:00
Ondřej Surý f6ccd59e8b Merge branch '658-dont-override-default-sysconfdir' into 'master'
Get rid of overriding default --sysconfdir and --localstatedir autoconf options

Closes #658

See merge request isc-projects/bind9!1455
2019-06-21 13:01:03 -04:00
Ondřej Surý a8dd98fbac Get rid of overriding default --sysconfdir and --localstatedir autoconf options
Previously the autoconf script set sysconfdir to /etc and localstatedir to /var
if they were not explicitly set in the ./configure invocation.  This MR reverts
the override and make it more in line with default and generally expected
autoconf behavior.
2019-06-21 18:42:50 +02:00
Ondřej Surý 5aaee26ed0 Merge branch '4-autoreconf-and-maintainer-mode' into 'master'
Add AM_MAINTAINER_MODE to autoconf.ac and re-generate configure in precheck CI step

See merge request isc-projects/bind9!2056
2019-06-21 04:55:49 -04:00
Ondřej Surý 0bdc3df5a0 Run autoreconf -fi in precheck phase and disable maintainer mode in build jobs 2019-06-21 10:37:39 +02:00
Ondřej Surý 2b1131cb28 Add AM_MAINTAINER_MODE macro to configure.ac and enable it by default
AM_MAINTAINER_MODE macro adds ability to disable rebuilding build file
(Makefile.in, configure, ...) when the source file changes.  This is
important in the CI where the timestamps could get skewed and that
triggers the rebuild on every ./configure run.
2019-06-21 10:37:39 +02:00
Ondřej Surý bc235cf477 Merge branch 'ondrej/unify-unix-and-win32-app.c' into 'master'
Merge unix/app.c and win32/app.c

See merge request isc-projects/bind9!1970
2019-06-21 04:36:45 -04:00
Ondřej Surý 0f9f1ece14 Stop requiring same memory ordering in win32 atomic_compare_exchange functions 2019-06-20 18:52:27 +02:00
Ondřej Surý 28af0de764 isc_app_reload doesn't return value, don't use return() there 2019-06-20 18:52:27 +02:00
Ondřej Surý 5098c95452 Merge unix/app.c and win32/app.c
The differences between two files are very minimal and most of the
code is common.  Merge those two files and use #ifdef WIN32 to include
the right bits on Windows.
2019-06-20 18:52:27 +02:00
Ondřej Surý 00b57b0120 Merge branch '1081-fix-statistics-in-x86-windows-builds' into 'master'
Fix statistics in x86 Windows builds

Closes #1081

See merge request isc-projects/bind9!2025
2019-06-20 12:07:28 -04:00
Michał KępieńandOndřej Surý cbb2edb8d3 Add CHANGES entry
5249.	[bug]		Statistics were broken in x86 Windows builds.
			[GL #1081]
2019-06-20 17:49:25 +02:00
Michał KępieńandOndřej Surý e21103f2d3 Fix statistics for x86 Windows builds
Using atomic_int_fast64_t variables with atomic functions on x86 does
not cause Visual Studio to report build errors, but such operations
yield useless results.  Since the isc_stat_t type is unconditionally
typedef'd to atomic_int_fast64_t, any code performing atomic operations
on isc_stat_t variables is broken in x86 Windows builds.  Fix by using
the atomic_int_fast32_t type for isc_stat_t in x86 Windows builds.
2019-06-20 17:49:25 +02:00
Ondřej Surý 9e499ddbf6 Merge branch '1094-bump-clientinfomethods-version' into 'master'
Bump DNS_CLIENTINFOMETHODS VERSION and AGE

Closes #1094

See merge request isc-projects/bind9!2051
2019-06-20 07:12:59 -04:00
Brian ConryandOndřej Surý 39344dfb3e Bump DNS_CLIENTINFOMETHODS_VERSION/_AGE to 2/1 in clientinfo.h
BIND 9.11.0 has bumped DNS_CLIENTINFOMETHODS_VERSION and _AGE to
version 2 and 1 in the dlz_minimal.h because a member was addet to the
dnsclientinfo struct.  It was found out that the new member is not
used anywhere and there are no accessor functions therefore the change
was reverted.

Later on, it was found out that the revert caused some problems to the
users of BIND 9, and thus this changes takes a different approach by
syncing the values other way around.
2019-06-20 12:46:21 +02:00
Ondřej Surý 04961a7e6b Revert "Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c"
This reverts commit a6f09b2255.
2019-06-20 12:46:21 +02:00
Evan Hunt 62fd8827c7 Merge branch 'u/fanf2/rsa-1024-delenda-est' into 'master'
Use 2048 bits as the default ZSK RSA key size in dnssec-keygen

Closes #1097

See merge request isc-projects/bind9!2055
2019-06-19 23:31:48 -04:00
Evan Hunt ac04d7b348 CHANGES 2019-06-19 19:45:06 -07:00
Tony FinchandEvan Hunt 24f23e7fad Use 2048 bits as the default ZSK RSA key size in dnssec-keygen 2019-06-19 19:39:21 -07:00
Evan Hunt af7b462b30 Merge branch 'security-master' into 'master'
merge security-master

See merge request isc-projects/bind9!2061
2019-06-19 19:14:43 -04:00
Tinderbox UserandEvan Hunt 14ea08c759 Merge branch 'prep-release' into security-master 2019-06-19 15:36:30 -07:00
Tinderbox UserandEvan Hunt 9bb0b30bc2 prep 9.15.1 2019-06-19 15:36:28 -07:00
Evan Hunt 7dfef18b05 Merge branch '942-security-move-test-inside-lock' into security-master 2019-06-19 15:35:58 -07:00
Evan Hunt f1b9bd6f07 CHANGES, release note 2019-06-19 15:35:57 -07:00
Mark AndrewsandEvan Hunt a78a9d37a8 move item_out test inside lock in dns_dispatch_getnext() 2019-06-19 15:35:57 -07:00
Ondřej Surý 95ecdcd762 Merge branch '161-fix-symbol-ordering-in-dns-update_test.c' into 'master'
Fix lib/dns/tests/update_test spurious errors on macOS

Closes #161

See merge request isc-projects/bind9!2050
2019-06-19 08:13:27 -04:00
Ondřej Surý 52f98c5734 Rename mctx in dnstest.c to dt_mctx to prevent any global/local name clashes
The common construct seen in the BIND 9 source is func(isc_mem_t *mctx, ...).
Unfortunately, the dnstest.{h,c} has been using mctx as a global symbol, which
in turn generated a lot of errors when update.c got included in update_test.c.

As a rule of thumb, we should avoid naming global symbols with generic names
(like mctx) and we should prefix them with "namespace" (like dt_mctx).
2019-06-19 13:52:19 +02:00
Ondřej Surý 6a1f24a863 Make CHECK() macro local by moving it from dnstest.h to respective .c files
The CHECK() macro has been defined both in dnstest.h and update.c
files.  This has created a conflict between macro definitions when
including both of the files in update_test.c.  While the CHECK() macro
is convenient for the tests, it has been really used in just two
files, so the MR moves them into those respective .c files.
2019-06-19 13:51:01 +02:00
Ondřej Surý 6713c6703e Fix spurious lib/dns/tests/update_test errors on macOS
lib/dns/tests/update_test was failing on macOS on random occasions.  It
turned out this was a linker problem - it preferred isc_stdtime_get()
from libisc instead of the local version in lib/dns/tests/update_test.c.

Fix by including the original .c file in the unit test.  This has two
benefits:

 a) linking order may no longer cause issues as symbols found in the
    same compilation unit are always preferred,

 b) it allows writing tests for static functions in lib/dns/update.c.
2019-06-19 13:31:43 +02:00
Ondřej Surý 695c997e6f Merge branch 'ondrej/autoconf-use-more-convenience-macros-from-autoconf-archive' into 'master'
Use couple more autoconf convenience macros to cleanup configure.ac

See merge request isc-projects/bind9!2054
2019-06-19 07:21:10 -04:00
Ondřej Surý a654756c3e Use couple more autoconf convenience macros to cleanup configure.ac
Pull and use several autoconf archive convenience macros to simplify
configure.ac.

* AX_CHECK_COMPILE_FLAG(FLAG, ...) - check whether given CFLAG works
* AX_CHECK_LINK_FLAG(FLAG, ...) - check whether given LDFLAG works
* AX_CHECK_PREPROC_FLAG(FLAG, ...) - check whether give CPPFLAG works
* AX_SAVE_FLAGS/AX_RESTORE_FLAGS - save and restore *FLAGS
2019-06-19 11:35:18 +02:00
Michał Kępień 5a941fbd88 Merge branch '1088-always-fail-a-system-test-if-crashes-are-detected' into 'master'
Always fail a system test if crashes are detected

Closes #1088

See merge request isc-projects/bind9!2041
2019-06-18 03:55:20 -04:00
Michał Kępień 7706f22924 Always fail a system test if crashes are detected
In certain situations (e.g. a named instance crashing upon shutdown in a
system test which involves shutting down a server and restarting it
afterwards), a system test may succeed despite a named crash being
triggered.  This must never be the case.  Extend run.sh to mark a test
as failed if core dumps or log lines indicating assertion failures are
detected (the latter is only an extra measure aimed at test environments
in which core dumps are not generated; note that some types of crashes,
e.g. segmentation faults, will not be detected using this method alone).
2019-06-18 09:14:07 +02:00
Michał Kępień 42cc7f5456 Merge branch 'michal/fix-transfer-statistics-extraction' into 'master'
Fix transfer statistics extraction

See merge request isc-projects/bind9!2038
2019-06-18 03:12:53 -04:00
Michał Kępień fab67c074a Fix transfer statistics extraction
Make the get_named_xfer_stats() helper shell function more precise in
order to prevent it from matching the wrong lines as that may trigger
false positives for the "ixfr" and "xfer" system tests.  As an example,
the regular expression responsible for extracting the number of bytes
transmitted throughout an entire zone transfer could also match a line
containing the following string:

    transfer of '<zone-name>/IN': sending TCP message of <integer> bytes

However, such a line is not one summarizing a zone transfer.

Also simplify both get_dig_xfer_stats() and get_named_xfer_stats() by
eliminating the need for "echo" statements in them.
2019-06-18 08:51:50 +02:00
Mark Andrews ea054d024a Merge branch 'marka-cleanup-builtin-config' into 'master'
remove geoip-use-ecs from default config

See merge request isc-projects/bind9!2032
2019-06-17 09:35:58 -04:00
Mark Andrews b2026bd9e8 remove geoip-use-ecs from default config 2019-06-17 09:24:46 -04:00
Michał Kępień 47c8deee52 Merge branch 'michal/tkey-system-test-fix-key-id-processing' into 'master'
"tkey" system test: fix key ID processing

See merge request isc-projects/bind9!2033
2019-06-17 08:43:18 -04:00
Michał Kępień 0b7b1161c2 Fix key ID processing
If ns1/setup.sh generates a key with ID 0, the "KEYID" token in
ns1/named.conf.in will be replaced with an empty string, causing the
following broken statement to appear in ns1/named.conf:

    tkey-dhkey "server" ;

Such a statement triggers false positives for the "tkey" system test due
to ns1 being unable to start with a broken configuration file.  Fix by
tweaking the regular expression used for removing leading zeros from the
key ID, so that it removes at most 4 leading zeros.
2019-06-17 14:15:18 +02:00
Witold Krecicki fd8adb1282 Merge branch '1067-underflow-recursing-clients-stats' into 'master'
Resolve "Underflow in Stats Channel RecursClients value?"

Closes #1067

See merge request isc-projects/bind9!2030
2019-06-13 08:19:32 -04:00
Witold KręcickiandMark Andrews c62a7c88b8 CHANGES note 2019-06-13 13:35:44 +10:00
Witold KręcickiandMark Andrews 24cfee942f Make sure that recursclient gauge is calculated correctly.
We increase recursclients when we attach to recursion quota,
decrease when we detach. In some cases, when we hit soft
quota, we might attach to quota without increasing recursclients
gauge. We then decrease the gauge when we detach from quota,
and it causes the statistics to underflow.
Fix makes sure that we increase recursclients always when we
succesfully attach to recursion quota.
2019-06-13 13:35:44 +10:00
Michał Kępień cd3b656001 Merge branch 'michal/address-compilation-warnings-for-O3-builds' into 'master'
Address compilation warnings for -O3 builds

See merge request isc-projects/bind9!1994
2019-06-11 04:49:01 -04:00
Michał Kępień ce796ac1f4 Address GCC 9.1 -O3 compilation warnings
Compiling with -O3 triggers the following warnings with GCC 9.1:

    task.c: In function ‘isc_taskmgr_create’:
    task.c:1384:43: warning: ‘%04u’ directive output may be truncated writing between 4 and 10 bytes into a region of size 6 [-Wformat-truncation=]
     1384 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                           ^~~~
    task.c:1384:32: note: directive argument in the range [0, 4294967294]
     1384 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                ^~~~~~~~~~~~~~~~
    task.c:1384:3: note: ‘snprintf’ output between 15 and 21 bytes into a destination of size 16
     1384 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    private_test.c: In function ‘private_nsec3_totext_test’:
    private_test.c:110:9: warning: array subscript 4 is outside array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
      110 |  while (*sp == '\0' && slen > 0) {
          |         ^~~
    private_test.c:103:11: note: while referencing ‘salt’
      103 |  uint32_t salt;
          |           ^~~~

Prevent these warnings from being triggered by increasing the size of
the relevant array (task.c) and reordering conditions (private_test.c).
2019-06-11 10:18:23 +02:00
Witold KręcickiandMichał Kępień 44e6bb8b93 Address GCC 8.3 -O3 compilation warning
Compiling with -O3 triggers the following warning with GCC 8.3:

    driver.c: In function ‘dlz_findzonedb’:
    driver.c:191:29: warning: ‘%u’ directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                                 ^~
    driver.c:191:25: note: directive argument in the range [0, 65535]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                             ^~~~~~~
    driver.c:191:2: note: ‘snprintf’ output between 3 and 106 bytes into a destination of size 100
      snprintf(buffer, size, "%s#%u", addr_buf, port);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Increase the size of the relevant array to prevent this warning from
being triggered.
2019-06-11 10:18:23 +02:00
Michał Kępień 3569487875 Make some build jobs use -O3 optimizations
Change the compiler optimization level for Debian sid build jobs from
-O2 to -O3 in order to enable triggering compilation warnings which are
not raised when -O2 is used.
2019-06-11 10:18:23 +02:00
Witold Krecicki 1eb7a9e10b Merge branch '1070-fix-zonemgr-unreachablecache' into 'master'
Resolve "Use zonemgr unreachable cache more effectively"

Closes #1070

See merge request isc-projects/bind9!2017
2019-06-11 03:58:22 -04:00
Ondřej SurýandWitold Kręcicki 3dcf121064 Put the items into unreachable LRU cache from first to last, not last to first 2019-06-11 09:38:59 +02:00
Witold Kręcicki 5adc0baaca Add Gitlab CI job with pthread_rwlock 2019-06-11 09:38:59 +02:00
Witold Kręcicki 68eb9a7c6a In dns_zonemgr_unreachable use atomics to avoid unnecessary
write locking.

Unreachable cache in zonemgr is realized as an static LRU list.
When we 'use' an entry we need to update the last-used time, we
can use atomics to do so without the necessity to upgrading
read-lock to write-lock.
2019-06-11 09:38:59 +02:00
Evan Hunt 34db730ee3 Merge branch '1082-fix-symtab-error' into 'master'
allocate memory for symtab keys

Closes #1082

See merge request isc-projects/bind9!2026
2019-06-10 21:56:54 -04:00
Evan Hunt 8136b09fa8 allocate memory for symtab keys
this prevents an intermittent failure when conflicts between
static and initializing keys are not detected by named-checkconf.
2019-06-10 18:39:53 -07:00
Witold Krecicki 90ff5a551a Merge branch 'wpk/git-replay-merge-worktrees' into 'master'
util/git-replay-merge.sh: make the tool compatible with git worktrees

See merge request isc-projects/bind9!1985
2019-06-10 10:51:01 -04:00
Witold Kręcicki db87352742 util/git-replay-merge.sh: make the tool compatible with git worktrees 2019-06-10 16:32:13 +02:00
Evan Hunt 32c86e29e2 Merge branch 'each-pandoc-args' into 'master'
specify title metadata and markdown format when calling pandoc

See merge request isc-projects/bind9!2022
2019-06-10 00:29:24 -04:00
Evan Hunt 3663f61e0e specify title metadata and markdown format when calling pandoc
this change silences a warning message and prevents the unwanted
use of smart quotes when using pandoc 2.7.1 to generate human-readable
versions of README and other markdown files.
2019-06-09 21:26:55 -07:00
Evan Hunt 8975a0830b Merge branch 'michal/minor-doc-fixes' into 'master'
Minor doc fixes

See merge request isc-projects/bind9!2018
2019-06-10 00:21:21 -04:00
Stephen MorrisandMichał Kępień d47c1d5dd0 Tweak paragraph style in release notes PDF 2019-06-07 08:37:22 +02:00
Stephen MorrisandMichał Kępień 644a2197f4 Fix typos in README and release notes 2019-06-07 08:37:22 +02:00
Mark Andrews 8ceaa19698 Merge branch 'marka-capture-checkconf-output' into 'master'
capture named-checkconf output

See merge request isc-projects/bind9!2014
2019-06-06 04:13:56 -04:00
Mark Andrews 36dd373ab4 capture named-checkconf output 2019-06-06 13:04:34 +10:00
Mark Andrews 0a8c47bae5 Merge branch 'marka-rndc-manpage-fix' into 'master'
add missing word 'includes'

See merge request isc-projects/bind9!2011
2019-06-05 19:20:28 -04:00
Mark Andrews c6553eb3fc add missing word 'includes' 2019-06-06 09:07:18 +10:00
Evan Hunt fd4e3a650d Merge branch '1064-fix-pthread-rwlock' into 'master'
Resolve "Adding --enable-pthread-rwlock broke Windows build"

Closes #1064

See merge request isc-projects/bind9!2009
2019-06-05 14:29:40 -04:00
Ondřej SurýandEvan Hunt d45f9e413f Enforce pthread rwlock to be only enabled in developer mode 2019-06-05 11:17:19 -07:00
Ondřej SurýandEvan Hunt ac3d9b97a3 Fix Windows build by moving #include <pthread.h> to correct #ifdef block 2019-06-05 11:17:19 -07:00
Ondřej SurýandEvan Hunt 1e2f40d01b Fixup the atomic code in pthread_rwlock branch of lib/isc/rwlock.c 2019-06-05 11:17:19 -07:00
Evan Hunt 48f16f223c Merge branch '6-deprecate-trusted-keys' into 'master'
Resolve "Merge trusted-key and managed-keys"

Closes #6

See merge request isc-projects/bind9!659
2019-06-05 11:15:43 -04:00
Evan Hunt a363455b58 CHANGES, release notes 2019-06-05 07:54:27 -07:00
Evan Hunt 3853b3cf6d update documentation
- change references to trusted-keys to dnssec-keys with static-key
- rebuild doc/misc/options and other generated grammar doc
- add a "see MANAGED-KEYS" note when building named.conf.docbook
2019-06-05 07:49:57 -07:00
Evan Hunt d07053c8f6 fail if using both dnssec-keys and managed-keys in the same config 2019-06-05 07:49:57 -07:00
Evan Hunt 0ef5b8edb7 rename keyfile_to_*_keys system test shell functions
- keyfile_to_trusted_keys -> keyfile_to_static_keys
- keyfile_to_managed_keys -> keyfile_to_initial_keys
2019-06-05 07:49:57 -07:00
Evan Hunt 821f041d8c "dnssec-keys" is now a synonym for "managed-keys"
- managed-keys is now deprecated as well as trusted-keys, though
  it continues to work as a synonym for dnssec-keys
- references to managed-keys have been updated throughout the code.
- tests have been updated to use dnssec-keys format
- also the trusted-keys entries have been removed from the generated
  bind.keys.h file and are no longer generated by bindkeys.pl.
2019-06-05 07:49:57 -07:00
Evan Hunt fec032588b update irs_dnsconf_load() to read managed-keys statements
- this allows the use of both trusted-keys and managed-keys in files
  loaded by libirs, but managed-keys are always treated as static.
2019-06-05 07:49:57 -07:00
Evan Hunt 82f5bce1bb update key checks in lib/bind9/check.c and fix checkconf test
- any use of trusted or static keys for the root zone will now
  elicit a warning, regardless of what the keys may be
- ditto for any use of a key for dlv.isc.org, static or managed
2019-06-05 07:49:57 -07:00
Evan Hunt a00e54cf0e revise system tests to use "static-key" syntax instead of "trusted-keys" 2019-06-05 07:49:57 -07:00
Evan Hunt 5ab252183b deprecate "trusted-keys"
- trusted-keys is now flagged as deprecated, but still works
- managed-keys can be used to configure permanent trust anchors by
  using the "static-key" keyword in place of "initial-key"
- parser now uses an enum for static-key and initial-key keywords
2019-06-05 07:49:23 -07:00
Mark Andrews 977dc54ef6 Merge branch 'u/fanf2/cleanup-cleaning-interval' into 'master'
Remove `cleaning-interval` remnants.

See merge request isc-projects/bind9!1731
2019-06-04 23:54:57 -04:00
Tony FinchandMark Andrews a9dca5831b Remove cleaning-interval remnants.
Since 2008, the cleaning-interval timer has been documented as
"effectively obsolete" and disabled in the default configuration with
a comment saying "now meaningless".

This change deletes all the code that implements the cleaning-interval
timer, except for the config parser in whcih it is now explicitly
marked as obsolete.

I have verified (using the deletelru and deletettl cache stats) that
named still cleans the cache after this change.
2019-06-05 13:08:12 +10:00
Mark Andrews e43925f284 Merge branch '1058-also-log-the-tsig-name-when-sending-notify' into 'master'
Resolve "Also log the TSIG name when sending notify"

Closes #1058

See merge request isc-projects/bind9!1963
2019-06-04 20:34:58 -04:00
Mark Andrews e1e800dd40 add CHANGES 2019-06-05 10:18:36 +10:00
Mark Andrews 0dd6c2be70 check that TSIG is logged in sending notify message 2019-06-05 10:18:36 +10:00
Mark Andrews bb51694d03 log TSIG key name when sending notify 2019-06-05 10:18:36 +10:00
Mark Andrews 9aac7f52f8 Merge branch '884-patches-to-review-6' into 'master'
Check all RSA algorithms for weak keys.

Closes #884

See merge request isc-projects/bind9!1535
2019-06-04 19:19:22 -04:00
Mark Andrews 30a50f9be4 check all RSA algorithms for weak keys 2019-06-05 09:00:05 +10:00
Mark Andrews 56106437b0 Merge branch '1066-macports-uses-opt-local-as-its-openssl-location' into 'master'
Resolve "MacPorts uses /opt/local as its OpenSSL location"

Closes #1066

See merge request isc-projects/bind9!2005
2019-06-04 04:13:29 -04:00
Mark Andrews 8973d4bd16 add /opt/local to list of locations for OpenSSL 2019-06-04 03:58:25 -04:00
Mark Andrews 9279641496 Merge branch '1063-pkcs11_test-is-not-being-expanded' into 'master'
Resolve "@PKCS11_TEST@ is not being expanded"

Closes #1063

See merge request isc-projects/bind9!2000
2019-06-04 03:57:43 -04:00
Mark Andrews fbd9c5c97f make PKCS11_TEST unix only 2019-06-04 03:45:41 -04:00
Mark Andrews 56e1b76a88 Merge branch '1017-remove-dead-stores' into 'master'
Resolve "remove dead stores"

Closes #1017

See merge request isc-projects/bind9!1926
2019-06-04 01:39:24 -04:00
Mark Andrews 4e97f7dccc POST(optlen) 2019-06-04 01:23:01 -04:00
Mark Andrews 1bbba52750 Merge branch 'cppcheck-and-cmocka-false-positive' into 'master'
teach clang analyser that _assert_int_equal and _assert_int_not_equal don't return on failure

See merge request isc-projects/bind9!1807
2019-06-03 23:24:23 -04:00
Mark Andrews 5d5d751c7f teach cppcheck that _assert_int_equal and _assert_int_not_equal don't return on failure 2019-06-03 23:04:10 -04:00
Michał Kępień ce52ac1178 Merge branch '1048-make-isc-endian.h-more-portable' into 'master'
Make <isc/endian.h> more portable

Closes #1049, #1048, and #856

See merge request isc-projects/bind9!2001
2019-06-03 08:27:06 -04:00
Michał Kępień c0e0643fc5 Make ifconfig.sh work on DragonFly BSD
On DragonFly BSD, use the same commands for configuring network
interfaces used during system tests as on NetBSD and OpenBSD.
2019-06-03 14:13:23 +02:00
Ondřej SurýandMichał Kępień 14ecd7d79e Revise the Windows section of <isc/endian.h>
Add a comment and remove redundant definitions.
2019-06-03 14:13:23 +02:00
Ondřej SurýandMichał Kępień 7e05848870 Revise the macOS section of <isc/endian.h>
Move the macOS section of <isc/endian.h> to a lower spot as it is
believed not to be the most popular platform for running BIND.  Add a
comment and remove redundant definitions.
2019-06-03 14:13:23 +02:00
Ondřej SurýandMichał Kępień 2e54b1be29 Make <isc/endian.h> detect GNU rather than Linux
Instead of only supporting Linux, try making <isc/endian.h> support
other GNU platforms as well.  Since some compilers define __GNUC__ on
BSDs (e.g. Clang on FreeBSD), move the relevant section to the bottom of
the platform-specific part of <isc/endian.h>, so that it only gets
evaluated when more specific platform determination criteria are not
met.  Also include <byteswap.h> so that any byte-swapping macros which
may be defined in that file on older platforms are used in the fallback
definitions of the nonstandard hto[bl]e{16,32,64}() and
[bl]e{16,32,64}toh() conversion functions.
2019-06-03 14:13:23 +02:00
Ondřej SurýandMichał Kępień 387cc00121 Add Solaris support for <isc/endian.h>
While Solaris does not support the nonstandard hto[bl]e{16,32,64}() and
[bl]e{16,32,64}toh() conversion functions, it does have some
byte-swapping macros available in <sys/byteorder.h>.  Ensure these
macros are used in the fallback definitions of the aforementioned
nonstandard functions.
2019-06-03 14:13:23 +02:00
Ondřej SurýandMichał Kępień 85059c2937 Add fallback definitions to <isc/endian.h>
Since the hto[bl]e{16,32,64}() and [bl]e{16,32,64}toh() conversion
functions are nonstandard, add fallback definitions of these functions
to <isc/endian.h>, so that their unavailability does not prevent
compilation from succeeding.
2019-06-03 14:13:23 +02:00
Michał Kępień 7ab1fb2a8d Fix <isc/endian.h> on BSD systems
Current versions of DragonFly BSD, FreeBSD, NetBSD, and OpenBSD all
support the modern variants of functions converting values between host
and big-endian/little-endian byte order while older ones might not.
Ensure <isc/endian.h> works properly in both cases.
2019-06-03 14:13:23 +02:00
Michał Kępień b675ace6c9 Merge branch 'michal/smartsign-system-test-properly-detect-presence-of-cds-cdnskey-records' into 'master'
"smartsign" system test: properly detect presence of CDS/CDNSKEY records

See merge request isc-projects/bind9!1988
2019-06-03 07:59:08 -04:00
Michał Kępień d0a73c7da6 Properly detect presence of CDS/CDNSKEY records
Replace grep calls with awk scripts to more precisely detect presence of
CDS and CDNSKEY records in a signed zone file, in order to prevent rare
false positives for the "smartsign" system test triggered by the strings
"CDS" and/or "CDNSKEY" being accidentally present in the Base64 form of
DNSSEC-related data in the zone file being checked.
2019-06-03 13:43:29 +02:00
Mark Andrews bae12f569d Merge branch '1009-isc-support-13911-ixfr-requests-sometimes-have-ending-logged-but-not-start' into 'master'
Resolve "[ISC-support #13911] IXFR requests sometimes have ending logged but not start"

Closes #1009

See merge request isc-projects/bind9!1887
2019-06-03 01:32:29 -04:00
Evan HuntandMark Andrews aca283919d CHANGES 2019-06-03 15:15:16 +10:00
Mark Andrews 915af3c950 change mnemonic for IXFR poll response 2019-06-03 15:14:45 +10:00
Mark Andrews 043df1be12 lower ixfr stop messages log level to debug(1) for poll style responses 2019-06-03 15:14:45 +10:00
Evan Hunt 62bc30e08f Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1999
2019-06-01 03:50:27 -04:00
Evan Hunt 9a2c4bf11e placeholder 2019-06-01 00:49:41 -07:00
Evan Hunt 86f60c0807 Merge branch 'each-fix-typo' into 'master'
fix typo

See merge request isc-projects/bind9!1997
2019-05-31 19:26:48 -04:00
Evan Hunt 1a980e8124 fix typo 2019-05-31 16:26:03 -07:00
Evan Hunt ab85681c11 Merge branch '1061-update-supported-rfc-list' into 'master'
Resolve "update supported RFC list"

Closes #1061

See merge request isc-projects/bind9!1972
2019-05-31 19:18:48 -04:00
Mark AndrewsandEvan Hunt 2846465719 add RFC6944 2019-05-31 16:17:30 -07:00
Mark AndrewsandEvan Hunt af356955e2 update RFC compliance document 2019-05-31 16:17:30 -07:00
Evan Hunt 28323f5ebf Merge branch '943-race-in-dispatcher-socket' into 'master'
Fix a possible race between udp dispatch and socket code

Closes #943

See merge request isc-projects/bind9!1992
2019-05-31 15:31:58 -04:00
Witold KręcickiandEvan Hunt e56d95847b CHANGES 2019-05-31 11:22:08 -07:00
Witold KręcickiandEvan Hunt e517c18d98 Fix a possible race between udp dispatch and socket code
There's a small possibility of race between udp dispatcher and
socket code - socket code can still hold internal reference to a
socket while dispatcher calls isc_socket_open, which can cause
an assertion failure. Fix it by relaxing the assertion test, and
instead simply locking the socket in isc_socket_open.
2019-05-31 11:21:28 -07:00
Witold Krecicki 126b3e0bd7 Merge branch '1055-qname-minimization-relaxed-lame' into 'master'
Don't SERVFAIL on lame delegations when doing qname minimization in relaxed mode

Closes #1055

See merge request isc-projects/bind9!1962
2019-05-31 03:11:27 -04:00
Evan Hunt 6d6e94bee7 fixup! Use experimental "_ A" minimization in relaxed mode. 2019-05-30 14:06:56 -07:00
Evan Hunt 8783735f89 CHANGES 2019-05-30 14:06:55 -07:00
Witold KręcickiandEvan Hunt ae52c2117e Use experimental "_ A" minimization in relaxed mode.
qname minimization, even in relaxed mode, can fail on
some very broken domains. In relaxed mode, instead of
asking for "foo.bar NS" ask for "_.foo.bar A" to either
get a delegation or NXDOMAIN. It will require more queries
than regular mode for proper NXDOMAINs.
2019-05-30 14:06:55 -07:00
Witold KręcickiandEvan Hunt 2691e729f0 Don't SERVFAIL on lame delegations when doing minimization in relaxed mode.
qname minimization in relaxed mode should fall back to regular
resolution in case of failure.
2019-05-30 12:38:18 -07:00
Ondřej Surý 6c6d93b29d Merge branch 'wpk-pthread-rwlock-optional' into 'master'
configure option to use pthread_rwlock instead of internal implementation

See merge request isc-projects/bind9!1397
2019-05-30 10:28:43 -04:00
Witold KręcickiandOndřej Surý 02bbf1e2b9 Add --enable-pthread-rwlock option 2019-05-30 16:10:16 +02:00
Ondřej Surý 4501f646ee Implement isc_rwlock_downgrade using pthreads and single atomic_bool 2019-05-30 16:10:16 +02:00
Ondřej Surý 64fbffbbaa Use simple pthread_rwlock in place of our custom adaptive rwlock 2019-05-30 16:10:16 +02:00
Ondřej Surý 158ab9afd4 Merge branch 'ondrej/enable-nolibtool-build-in-CI' into 'master'
Enable nolibtool build in CI

See merge request isc-projects/bind9!1953
2019-05-30 09:12:27 -04:00
Ondřej Surý 22fda5c719 bin/named/main.c: clean possibly uninitalized variable in save_command_line() 2019-05-30 14:42:37 +02:00
Ondřej Surý a25aa889e1 Fix uninitialized variable warning in restore_nsec3param() 2019-05-30 14:42:37 +02:00
Ondřej Surý 5bc68d16e2 Add nolibtool CI job 2019-05-30 14:42:37 +02:00
Mark Andrews 4cd01cd7c5 Merge branch '225-ed448-broken-with-openssl-1-1-1-pre6' into 'master'
Fix ASN.1 length values in Ed448 public and private key prefix blobs.

Closes #225

See merge request isc-projects/bind9!1971
2019-05-30 08:39:39 -04:00
Mark Andrews 6c499a0c08 add CHANGES note 2019-05-30 18:03:10 +10:00
Mark Andrews 20f2d9b41b test Ed448 against test vectors 2019-05-30 18:00:31 +10:00
Mark Andrews 5da97eeea6 fix Ed448 length values for precomputed ASN.1 prefix blobs 2019-05-30 18:00:31 +10:00
Mark Andrews 4157e6ab73 Merge branch '1011-use-proper-linker-config-on-hp-ux' into 'master'
Resolve "Use proper linker (config) on HP-UX"

Closes #1011

See merge request isc-projects/bind9!1940
2019-05-29 20:30:00 -04:00
Mark Andrews 92325d3150 regen 2019-05-29 20:11:21 -04:00
Mark Andrews 61752bf8ac add link flags for ia64-hp-hpux 2019-05-29 20:11:21 -04:00
Ondřej Surý ebbedd6c03 Merge branch '996-revert-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'
Revert "Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'"

Closes #996

See merge request isc-projects/bind9!1981
2019-05-29 10:14:21 -04:00
Ondřej Surý 52a8fb31c7 Revert "Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'"
This reverts commit ea131d2e6a, reversing
changes made to e79dd268b6.
2019-05-29 15:34:08 +02:00
Ondřej Surý bdde335cca Merge branch '855-json-c-library-detection-in-autoconf' into 'master'
Cleanup the way we detect json-c library to use only pkg-config

Closes #855

See merge request isc-projects/bind9!1473
2019-05-29 09:23:29 -04:00
Ondřej Surý 9c47bad86a Add CHANGES and release notes 2019-05-29 15:08:52 +02:00
Ondřej Surý 4d2d3b49ce Cleanup the way we detect json-c library to use only pkg-config 2019-05-29 15:08:52 +02:00
Ondřej Surý d54f3f8b8c Merge branch '1044-fix-LFS-flags-on-BSDs' into 'master'
Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make

Closes #1044

See merge request isc-projects/bind9!1978
2019-05-29 06:03:34 -04:00
Ondřej Surý d4596baed4 Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make 2019-05-29 11:50:24 +02:00
Michał Kępień 4419d7bf6b Merge branch 'michal/legacy-system-test-fixes' into 'master'
"legacy" system test fixes

See merge request isc-projects/bind9!1968
2019-05-29 05:33:50 -04:00
Michał Kępień 47b850348c Optimize dig parameters to decrease test run time
Performing server setup checks using "+tries=3 +time=5" is redundant as
a single query is arguably good enough for determining whether a given
named instance was set up properly.  Only use multiple queries with a
long timeout for resolution checks in the "legacy" system test, in order
to significantly reduce its run time (on a contemporary machine, from
about 1m45s to 0m40s).
2019-05-29 11:05:01 +02:00
Michał Kępień bb939a03ff Make "plain" server setup checks more similar
Send a test TCP query to the "plain" server during its setup check to
improve its consistency with the setup check for the "plain + no TCP"
server.
2019-05-29 11:05:01 +02:00
Michał Kępień 56ed1275c6 Add more EDNS checks for dig output files
In the "legacy" system test, in order to make server setup checks more
consistent with each other, add further checks for either presence or
absence of the EDNS OPT pseudo-RR in the responses returned by the
tested named instances.
2019-05-29 11:05:01 +02:00
Michał Kępień 4dea5cb799 Do not ignore dig exit codes
Make sure the "legacy" system test fails if any exit code returned by
dig does not match the expected one.
2019-05-29 11:05:01 +02:00
Michał Kępień effd16ab25 Use helper functions for checking resolution
Extract repeated dig and grep calls into two helper shell functions,
resolution_succeeds() and resolution_fails(), in order to reduce code
duplication in the "legacy" system test, emphasize the similarity
between all the resolution checks in that test, and make the conditions
for success and failure uniform for all resolution checks in that test.
2019-05-29 11:05:01 +02:00
Michał Kępień aaf81ca6ef Use +dnssec instead of separate TXT records
When testing named instances which are configured to drop outgoing UDP
responses larger than 512 bytes, querying with DO=1 may be used instead
of querying for large TXT records as the effect achieved will be
identical: an unsigned response for a SOA query will be below 512 bytes
in size while a signed response for the same query will be over 512
bytes in size.  Doing this makes all resolution checks in the "legacy"
system test more similar.  Add checks for the TC flag being set in UDP
responses which are expected to be truncated to further make sure that
tested named instances behave as expected.
2019-05-29 11:05:01 +02:00
Michał Kępień 3e7fa15ca3 Fix the name of the file to inspect
One of the checks in the "legacy" system test inspects dig.out.1.test$n
instead of dig.out.2.test$n.  Fix the file name used in that check.
2019-05-29 11:05:01 +02:00
Michał Kępień 6283c1cc7e Ensure queries expected to time out really do
Make sure that the "legacy" system test fails if queries which are
expected to time out do not really time out.
2019-05-29 11:05:01 +02:00
Michał Kępień 9491616e5c Properly test servers with TCP support disabled
Sending TCP queries to test named instances with TCP support disabled
should cause dig output to contain the phrase "connection refused", not
"connection timed out", as such instances never open the relevant
sockets.  Make sure that the "legacy" system test fails if the expected
phrase is not found in any of the relevant files containing dig output.
2019-05-29 11:05:01 +02:00
Ondřej Surý db9cfde1ab Merge branch '1044-include-config.h-in-gen.c' into 'master'
Resolve "gen fails to generate headers on Debian buster"

Closes #1044

See merge request isc-projects/bind9!1954
2019-05-29 04:30:11 -04:00
Ondřej Surý 4c7345bcb6 Use getconf LFS_{CFLAGS,LDFLAGS,LIBS} to get flags to compile lib/dns/gen
On some systems (namely Debian buster armhf) the readdir() call fails
with `Value too large for defined data type` unless the
_FILE_OFFSET_BITS=64 is defined.  The correct way to fix this is to
get the appropriate compilation parameters from getconf system
interface.
2019-05-29 06:58:41 +02:00
Ondřej Surý 05b7c08a16 Exit the ./gen program on failed readdir() call 2019-05-27 16:13:16 +02:00
Mark Andrews fa806cc7b3 Merge branch '1056-misleading-error-message-when-trying-to-build-without-python-support' into 'master'
Resolve "Misleading error message when trying to build without Python support"

Closes #1056

See merge request isc-projects/bind9!1964
2019-05-26 23:35:46 -04:00
Mark Andrews d70bf76d80 fix configire error message to say --without-python 2019-05-27 13:19:25 +10:00
Witold Krecicki 571f0beee0 Merge branch '1046-deadlock-in-tcp-code' into 'master'
Fix a possible deadlock in TCP accepting

Closes #1046

See merge request isc-projects/bind9!1958
2019-05-24 03:29:44 -04:00
Witold Kręcicki 75815c1581 Fix a possible deadlock in TCP accepting
Each network thread holds an array of locks, indexed by a hash
of fd. When we accept a connection we hold a lock in accepting thread.
We then generate the thread number and lock bucket for the new
connection socket - if we hit the same thread and lock bucket as
accepting socket we get a deadlock. Avoid this by checking if we're
in the same thread/lock bucket and not locking in this case.
2019-05-24 03:18:41 -04:00
Mark Andrews 4d498b3dac Merge branch '1050-build-failure-on-windows' into 'master'
Resolve "Build failure on Windows"

Closes #1050

See merge request isc-projects/bind9!1959
2019-05-24 02:39:13 -04:00
Mark Andrews 505ec918d7 include <isc/string.h> for isc_string_strerror_r prototype 2019-05-24 16:27:40 +10:00
Mark Andrews 978a37c827 use atomics in lib/isc/win32/app.c 2019-05-24 16:27:40 +10:00
Mark Andrews 8ddc54e200 Merge branch '1028-dig-trace-should-not-set-rd-0-norecurse-for-the-initial-root-hints-query' into 'master'
Resolve "dig +trace should not set RD=0 (+norecurse) for the initial root hints query"

Closes #1028

See merge request isc-projects/bind9!1939
2019-05-21 23:13:18 -04:00
Mark Andrews e65d4989a1 Recurse to find the root server list with 'dig +trace'. 2019-05-22 13:02:15 +10:00
Ondřej Surý 00ff786384 Merge branch '605-add-siphash24' into 'master'
Add SipHash24 algorithm and use it in isc_hash function

Closes #360

See merge request isc-projects/bind9!1462
2019-05-21 07:50:25 -04:00
Ondřej Surý dc9543abb3 Add CHANGES entry:
5236.   [func]          Add SipHash 2-4 implementation in lib/isc/siphash.c
                        and switch isc_hash_function() to use SipHash 2-4.
                        [GL #605]
2019-05-21 10:23:20 +00:00
Ondřej Surý d5055665ca Remove isc_hash_reverse function 2019-05-21 10:23:17 +00:00
Ondřej Surý 2e7d82443f Convert isc_hash functions to use isc_siphash24 2019-05-21 10:23:13 +00:00
Ondřej Surý 2cbf633192 Add tests for the isc_siphash24 function 2019-05-20 19:01:31 +02:00
Ondřej Surý a197df137a Add reference SipHash 2-4 implementation 2019-05-20 19:01:31 +02:00
Ondřej Surý 0efc36c19a Add portable <isc/endian.h> header 2019-05-20 19:01:31 +02:00
Ondřej Surý efff347f96 Merge branch '1023-make-app.c-TSAN-clean' into 'master'
Make isc_app_t opaque and thread-safe

Closes #1023

See merge request isc-projects/bind9!1936
2019-05-20 13:00:19 -04:00
Ondřej Surý 93aa9766e5 Add CHANGES entry:
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]
2019-05-20 18:39:28 +02:00
Ondřej Surý eb8c9bdd55 Make lib/isc/app.c opaque and thread-safe
This work cleans up the API which includes couple of things:

1. Make the isc_appctx_t type fully opaque

2. Protect all access to the isc_app_t members via stdatomics

3. sigwait() is part of POSIX.1, remove dead non-sigwait code

4. Remove unused code: isc_appctx_set{taskmgr,sockmgr,timermgr}
2019-05-20 18:13:02 +02:00
Evan Hunt 4d30aee3e2 Merge branch 'each-document-bug-ids' into 'master'
update README to explain gitlab numbers

See merge request isc-projects/bind9!1946
2019-05-17 02:43:38 -04:00
Evan Hunt 45d76498d9 update README to explain gitlab numbers 2019-05-17 02:28:47 -04:00
Ondřej Surý 316b399f95 Merge branch '1003-SO_REUSEPORT-tweaks' into 'master'
Resolve "socket.c error 'SO_REUSEPORT' undeclared"

Closes #1003

See merge request isc-projects/bind9!1884
2019-05-17 01:37:48 -04:00
Ondřej Surý 94cb73d96c Use SO_REUSEPORT_LB on FreeBSD if available 2019-05-15 07:30:23 +02:00
Ondřej Surý 1c672367a0 Add safeguard against the other usage of SO_REUSEPORT 2019-05-15 07:30:23 +02:00
798 changed files with 18672 additions and 16551 deletions
+17
View File
@@ -53,6 +53,7 @@
(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")
)
)
@@ -60,6 +61,7 @@
(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"
@@ -67,5 +69,20 @@
(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")))
)
)
)
))
+240 -32
View File
@@ -8,10 +8,18 @@ variables:
CCACHE_DIR: "/ccache"
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
# VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml
KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results"
BUILD_PARALLEL_JOBS: 6
TEST_PARALLEL_JOBS: 6
stages:
- precheck
- build
- test
- unit
- system
- docs
- push
### Runner Tag Templates
@@ -28,6 +36,12 @@ stages:
### Docker Image Templates
# Alpine Linux
.alpine-3.10-amd64: &alpine_3_10_amd64_image
image: "$CI_REGISTRY_IMAGE:alpine-3.10-amd64"
<<: *linux_amd64
# CentOS
.centos-centos6-amd64: &centos_centos6_amd64_image
@@ -44,10 +58,6 @@ stages:
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
<<: *linux_amd64
.debian-jessie-i386: &debian_jessie_i386_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
<<: *linux_i386
.debian-stretch-amd64: &debian_stretch_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
<<: *linux_amd64
@@ -56,6 +66,10 @@ stages:
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
<<: *linux_i386
.debian-buster-amd64: &debian_buster_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
<<: *linux_i386
.debian-sid-amd64: &debian_sid_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
<<: *linux_amd64
@@ -66,8 +80,8 @@ stages:
# Fedora
.fedora-29-amd64: &fedora_29_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-29-amd64"
.fedora-30-amd64: &fedora_30_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-30-amd64"
<<: *linux_amd64
# Ubuntu
@@ -101,26 +115,64 @@ stages:
<<: *debian_sid_amd64_image
stage: precheck
.autoconf: &autoconf_job
<<: *default_triggering_rules
<<: *debian_sid_amd64_image
stage: precheck
script:
- autoreconf -fi
artifacts:
untracked: true
expire_in: "1 hour"
.configure: &configure |
./configure \
--disable-maintainer-mode \
--enable-developer \
--with-libtool \
--disable-static \
--with-cmocka \
--with-libxml2 \
--with-json-c \
--prefix=$HOME/.local \
--without-make-clean \
$EXTRA_CONFIGURE \
|| cat config.log
.build: &build_job
<<: *default_triggering_rules
stage: build
before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
script:
- ./configure --enable-developer --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
- *configure
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
- test -z "${RUN_MAKE_INSTALL}" || make install
dependencies:
- autoreconf:sid:amd64
needs:
- autoreconf:sid:amd64
artifacts:
untracked: true
expire_in: "1 hour"
.setup_interfaces: &setup_interfaces |
if [ "$(id -u)" -eq "0" ]; then
sh -x bin/tests/system/ifconfig.sh up;
else
sudo sh -x bin/tests/system/ifconfig.sh up;
fi
.setup_softhsm: &setup_softhsm |
sh -x util/prepare-softhsm2.sh
.system_test: &system_test_job
<<: *default_triggering_rules
stage: test
stage: system
retry: 2
before_script:
- bash -x bin/tests/system/ifconfig.sh up
- bash -x util/prepare-softhsm2.sh
- *setup_interfaces
- *setup_softhsm
script:
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- test -s bin/tests/system/systests.output
@@ -129,16 +181,22 @@ stages:
expire_in: "1 week"
when: on_failure
.kyua_report: &kyua_report_html |
kyua report-html \
--force \
--results-file "$KYUA_RESULT" \
--results-filter "" \
--output kyua_html
.unit_test: &unit_test_job
<<: *default_triggering_rules
stage: test
stage: unit
before_script:
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
- bash -x util/prepare-softhsm2.sh
- *setup_softhsm
script:
- make unit
after_script:
- kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html
- *kyua_report_html
artifacts:
paths:
- kyua.log
@@ -151,6 +209,9 @@ stages:
# Jobs in the precheck stage
autoreconf:sid:amd64:
<<: *autoconf_job
misc:sid:amd64:
<<: *precheck_job
script:
@@ -177,17 +238,23 @@ misc:sid:amd64:
🐞:sid:amd64:
<<: *precheck_job
script: util/check-cocci
script:
- util/check-cocci
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
# Jobs for doc builds on Debian Sid (amd64)
docs:sid:amd64:
<<: *debian_sid_amd64_image
stage: build
stage: docs
script:
- ./configure || cat config.log
- make -C doc/misc docbook
- make -C doc/arm Bv9ARM.html
dependencies:
- autoreconf:sid:amd64
needs:
- autoreconf:sid:amd64
artifacts:
paths:
- doc/arm/
@@ -209,6 +276,30 @@ push:docs:sid:amd64:
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
# Jobs for regular GCC builds on Alpine Linux 3.10 (amd64)
gcc:alpine3.10:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--enable-dnstap"
<<: *alpine_3_10_amd64_image
<<: *build_job
system:gcc:alpine3.10:amd64:
<<: *alpine_3_10_amd64_image
<<: *system_test_job
dependencies:
- gcc:alpine3.10:amd64
needs: ["gcc:alpine3.10:amd64"]
unit:gcc:alpine3.10:amd64:
<<: *alpine_3_10_amd64_image
<<: *unit_test_job
dependencies:
- gcc:alpine3.10:amd64
needs: ["gcc:alpine3.10:amd64"]
# Jobs for regular GCC builds on CentOS 6 (amd64)
gcc:centos6:amd64:
@@ -224,12 +315,14 @@ system:gcc:centos6:amd64:
<<: *system_test_job
dependencies:
- gcc:centos6:amd64
needs: ["gcc:centos6:amd64"]
unit:gcc:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *unit_test_job
dependencies:
- gcc:centos6:amd64
needs: ["gcc:centos6:amd64"]
# Jobs for regular GCC builds on CentOS 7 (amd64)
@@ -237,7 +330,7 @@ gcc:centos7:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
<<: *centos_centos7_amd64_image
<<: *build_job
@@ -246,12 +339,14 @@ system:gcc:centos7:amd64:
<<: *system_test_job
dependencies:
- gcc:centos7:amd64
needs: ["gcc:centos7:amd64"]
unit:gcc:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *unit_test_job
dependencies:
- gcc:centos7:amd64
needs: ["gcc:centos7:amd64"]
# Jobs for regular GCC builds on Debian 8 Jessie (amd64)
@@ -259,7 +354,7 @@ gcc:jessie:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--without-cmocka --with-python"
EXTRA_CONFIGURE: "--without-cmocka --with-python --disable-geoip"
<<: *debian_jessie_amd64_image
<<: *build_job
@@ -268,12 +363,14 @@ system:gcc:jessie:amd64:
<<: *system_test_job
dependencies:
- gcc:jessie:amd64
needs: ["gcc:jessie:amd64"]
unit:gcc:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *unit_test_job
dependencies:
- gcc:jessie:amd64
needs: ["gcc:jessie:amd64"]
# Jobs for regular GCC builds on Debian 9 Stretch (amd64)
@@ -289,20 +386,45 @@ system:gcc:stretch:amd64:
<<: *system_test_job
dependencies:
- gcc:stretch:amd64
needs: ["gcc:stretch:amd64"]
unit:gcc:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- gcc:stretch:amd64
needs: ["gcc:stretch:amd64"]
# Jobs for regular GCC builds on Debian 10 Buster (amd64)
gcc:buster:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_buster_amd64_image
<<: *build_job
system:gcc:buster:amd64:
<<: *debian_buster_amd64_image
<<: *system_test_job
dependencies:
- gcc:buster:amd64
needs: ["gcc:buster:amd64"]
unit:gcc:buster:amd64:
<<: *debian_buster_amd64_image
<<: *unit_test_job
dependencies:
- gcc:buster:amd64
needs: ["gcc:buster:amd64"]
# Jobs for regular GCC builds on Debian Sid (amd64)
gcc:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
CFLAGS: "-Wall -Wextra -O3 -g"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1
<<: *debian_sid_amd64_image
<<: *build_job
@@ -312,20 +434,22 @@ system:gcc:sid:amd64:
<<: *system_test_job
dependencies:
- gcc:sid:amd64
needs: ["gcc:sid:amd64"]
unit:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- gcc:sid:amd64
needs: ["gcc:sid:amd64"]
# Jobs for regular GCC builds on Debian Sid (i386)
gcc:sid:i386:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2 --without-python"
CFLAGS: "-Wall -Wextra -O3 -g"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-python"
<<: *debian_sid_i386_image
<<: *build_job
@@ -334,34 +458,38 @@ system:gcc:sid:i386:
<<: *system_test_job
dependencies:
- gcc:sid:i386
needs: ["gcc:sid:i386"]
unit:gcc:sid:i386:
<<: *debian_sid_i386_image
<<: *unit_test_job
dependencies:
- gcc:sid:i386
needs: ["gcc:sid:i386"]
# Jobs for regular GCC builds on Fedora 29 (amd64)
# Jobs for regular GCC builds on Fedora 30 (amd64)
gcc:fedora29:amd64:
gcc:fedora30:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *fedora_29_amd64_image
<<: *fedora_30_amd64_image
<<: *build_job
system:gcc:fedora29:amd64:
<<: *fedora_29_amd64_image
system:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
<<: *system_test_job
dependencies:
- gcc:fedora29:amd64
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
unit:gcc:fedora29:amd64:
<<: *fedora_29_amd64_image
unit:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
<<: *unit_test_job
dependencies:
- gcc:fedora29:amd64
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
@@ -369,6 +497,7 @@ gcc:xenial:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--disable-geoip"
<<: *ubuntu_xenial_amd64_image
<<: *build_job
@@ -377,12 +506,14 @@ system:gcc:xenial:amd64:
<<: *system_test_job
dependencies:
- gcc:xenial:amd64
needs: ["gcc:xenial:amd64"]
unit:gcc:xenial:amd64:
<<: *ubuntu_xenial_amd64_image
<<: *unit_test_job
dependencies:
- gcc:xenial:amd64
needs: ["gcc:xenial:amd64"]
# Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64)
@@ -399,12 +530,14 @@ system:gcc:bionic:amd64:
<<: *system_test_job
dependencies:
- gcc:bionic:amd64
needs: ["gcc:bionic:amd64"]
unit:gcc:bionic:amd64:
<<: *ubuntu_bionic_amd64_image
<<: *unit_test_job
dependencies:
- gcc:bionic:amd64
needs: ["gcc:bionic:amd64"]
# Jobs for GCC builds with ASAN enabled on Debian Sid (amd64)
@@ -422,12 +555,60 @@ system:asan:sid:amd64:
<<: *system_test_job
dependencies:
- asan:sid:amd64
needs: ["asan:sid:amd64"]
unit:asan:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- asan:sid:amd64
needs: ["asan:sid:amd64"]
rwlock:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock"
<<: *debian_sid_amd64_image
<<: *build_job
system:rwlock:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- rwlock:sid:amd64
needs: ["rwlock:sid:amd64"]
unit:rwlock:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- rwlock:sid:amd64
needs: ["rwlock:sid:amd64"]
# Jobs for mutex-based atomics on Debian SID (amd64)
mutexatomics:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -DISC_MEM_USE_INTERNAL_MALLOC=0"
EXTRA_CONFIGURE: "--with-libidn2 --enable-mutex-atomics"
<<: *debian_sid_amd64_image
<<: *build_job
#system:mutexatomics:sid:amd64:
# <<: *debian_sid_amd64_image
# <<: *system_test_job
# dependencies:
# - mutexatomics:sid:amd64
# - mutexatomics:sid:amd64
# allow_failure: true
#unit:mutexatomics:sid:amd64:
# <<: *debian_sid_amd64_image
# <<: *unit_test_job
# dependencies:
# - mutexatomics:sid:amd64
# allow_failure: true
# Jobs for Clang builds on Debian Stretch (amd64)
@@ -444,6 +625,7 @@ unit:clang:stretch:amd64:
<<: *unit_test_job
dependencies:
- clang:stretch:amd64
needs: ["clang:stretch:amd64"]
# Jobs for Clang builds on Debian Stretch (i386)
@@ -470,9 +652,35 @@ system:pkcs11:sid:amd64:
<<: *system_test_job
dependencies:
- pkcs11:sid:amd64
needs: ["pkcs11:sid:amd64"]
unit:pkcs11:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- pkcs11:sid:amd64
needs: ["pkcs11:sid:amd64"]
# Jobs with libtool disabled
nolibtool:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -Og -g"
EXTRA_CONFIGURE: "--with-libidn2 --without-libtool --with-dlopen"
<<: *debian_sid_amd64_image
<<: *build_job
system:nolibtool:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- nolibtool:sid:amd64
needs: ["nolibtool:sid:amd64"]
unit:nolibtool:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- nolibtool:sid:amd64
needs: ["nolibtool:sid:amd64"]
+4 -1
View File
@@ -39,6 +39,9 @@
- [ ] Update tickets in case of waiting support customers.
## Marketing
- [ ] Post short note to Twitter.
- [ ] Update BIND Product page if needed
- [ ] Update BIND Significant Features Matrix in KB if needed
- [ ] Update BIND -S Edition data sheet if S Edition feature change
- [ ] Announce on social media
- [ ] Update [Wikipedia entry for BIND](http://en.wikipedia.org/wiki/BIND).
- [ ] Write blog article (if a major release).
+185
View File
@@ -1,3 +1,188 @@
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 toggleable.
[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 minimizatiom 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]
+79
View File
@@ -0,0 +1,79 @@
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.
+71
View File
@@ -0,0 +1,71 @@
# 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
View File
@@ -1,3 +1,5 @@
CONTRIBUTING
BIND Source Access and Contributor Guidelines
Feb 22, 2018
@@ -32,6 +34,14 @@ 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.
+9 -1
View File
@@ -41,6 +41,14 @@ 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
@@ -108,7 +116,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="bugs"></a>Contributing code
### <a name="contrib"></a>Contributing code
BIND is licensed under the
[Mozilla Public License 2.0](http://www.isc.org/downloads/software-support-policy/isc-license/).
+6 -4
View File
@@ -1,3 +1,5 @@
HISTORY
Functional enhancements from prior major releases of BIND 9
BIND 9.14
@@ -505,11 +507,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 basis as some servers only appear to
be lame for certain query types.
* The lame cache is now done on a <qname,qclass,qtype> basis as some
servers only appear to be lame for certain query types.
* Limit the number of recursive clients that can be waiting for a single
query () to resolve. New options clients-per-query and
max-clients-per-query.
query (<qname,qtype,qclass>) to resolve. New options clients-per-query
and max-clients-per-query.
* dig: report the number of extra bytes still left in the packet after
processing all the records.
* Support for IPSECKEY rdata type.
+13 -26
View File
@@ -18,11 +18,7 @@ SUBDIRS = make lib fuzz bin doc
TARGETS =
PREREQS = bind.keys.h
MANPAGES = isc-config.sh.1
HTMLPAGES = isc-config.sh.html
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS \
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS CODE_OF_CONDUCT \
${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
@@ -35,7 +31,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 isc-config.sh configure.lineno
rm -f libtool 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
@@ -54,25 +50,11 @@ installdirs:
${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
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:: installdirs
${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 \
@@ -97,27 +79,32 @@ test-force:
exit $$status
README: README.md
${PANDOC} --email-obfuscation=none -s -t html README.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
HISTORY: HISTORY.md
${PANDOC} --email-obfuscation=none -s -t html HISTORY.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
OPTIONS: OPTIONS.md
${PANDOC} --email-obfuscation=none -s -t html OPTIONS.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
CONTRIBUTING: CONTRIBUTING.md
${PANDOC} --email-obfuscation=none -s -t html CONTRIBUTING.md | \
${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
PLATFORMS: PLATFORMS.md
${PANDOC} --email-obfuscation=none -s -t html 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 $< | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
+3 -1
View File
@@ -1,10 +1,12 @@
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.
+2 -25
View File
@@ -1,3 +1,5 @@
PLATFORMS
Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
@@ -64,31 +66,6 @@ These are platforms on which BIND 9.15 is known not to build or run:
Platform quirks
ARM
If the compilation ends with following error:
Error: selected processor does not support `yield' in ARM mode
You will need to set -march compiler option to native, so the compiler
recognizes yield assembler instruction. The proper way to set -march=
native would be to put it into CFLAGS, e.g. run ./configure like this:
CFLAGS="-march=native -Os -g" ./configure plus your usual options.
If that doesn't work, you can enforce the minimum CPU and FPU (taken from
Debian armhf documentation):
* The lowest worthwhile CPU implementation is Armv7-A, therefore the
recommended build option is -march=armv7-a.
* FPU should be set at VFPv3-D16 as they represent the minimum
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
NetBSD 6 i386
The i386 build of NetBSD requires the libatomic library, available from
+54 -28
View File
@@ -1,3 +1,5 @@
README
BIND 9
Contents
@@ -37,7 +39,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 licenced under the terms of the Mozilla Public License,
source software licensed under the terms of the Mozilla Public License,
version 2.0.
For a summary of features introduced in past major releases of BIND, see
@@ -85,8 +87,9 @@ 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 - BIND 9 code style: doc/dev/style.md
- BIND architecture and developer guide: doc/dev/dev.md
General information: CONTRIBUTING.md - Code of Conduct: CODE_OF_CONDUCT.md
- BIND 9 code style: doc/dev/style.md - BIND architecture and developer
guide: doc/dev/dev.md
Patches for BIND may be submitted as Merge Requests in the ISC GitLab
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
@@ -103,7 +106,10 @@ format-patch.
BIND 9.15 features
BIND 9.15 is the newest development branch of BIND 9. It includes a number
of changes from BIND 9.14 and earlier releases.
of changes from BIND 9.14 and earlier releases. New features include:
* Support for the new GeoIP2 geolocation API
* Improved DNSSEC key configuration using dnssec-keys
Building BIND
@@ -134,7 +140,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
@@ -187,8 +193,10 @@ operations, specify the path to the PKCS#11 provider library using
To support the HTTP statistics channel, the server must be linked with at
least one of the following: libxml2 http://xmlsoft.org or json-c https://
github.com/json-c. If these are installed at a nonstandard location,
specify the prefix using --with-libxml2=/prefix or --with-libjson=/prefix.
github.com/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.
To support compression on the HTTP statistics channel, the server must be
linked against libzlib. If this is installed in a nonstandard location,
@@ -198,10 +206,11 @@ 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 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.
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.
For DNSTAP packet logging, you must have installed libfstrm https://
github.com/farsightsec/fstrm and libprotobuf-c https://
@@ -239,11 +248,8 @@ default, installation is into /usr/local, but this can be changed with the
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. 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.
set the default parent directory of run/named.pid. --sysconfdir defaults
to $prefix/etc and --localstatedir defaults to $prefix/var.
Automated testing
@@ -286,7 +292,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
@@ -314,26 +320,46 @@ 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 senstive.
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)
+39 -14
View File
@@ -48,7 +48,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
licenced under the terms of the Mozilla Public License, version 2.0.
licensed under the terms of the Mozilla Public License, version 2.0.
For a summary of features introduced in past major releases of BIND,
see the file [HISTORY](HISTORY.md).
@@ -98,7 +98,8 @@ 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)
- General information: [CONTRIBUTING.md](CONTRIBUTING.md)
- Code of Conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
- 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)
@@ -120,7 +121,12 @@ including your patch as an attachment, preferably generated by
### <a name="features"/> BIND 9.15 features
BIND 9.15 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.14 and earlier releases.
number of changes from BIND 9.14 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.
### <a name="build"/> Building BIND
@@ -200,8 +206,10 @@ To support the HTTP statistics channel, the server must be linked with at
least one of the following: libxml2
[http://xmlsoft.org](http://xmlsoft.org) or json-c
[https://github.com/json-c](https://github.com/json-c). If these are
installed at a nonstandard location, specify the prefix using
`--with-libxml2=/prefix` or `--with-libjson=/prefix`.
installed at a nonstandard location, then:
* for libxml2, specify the prefix using `--with-libxml2=/prefix`,
* for json-c, adjust `PKG_CONFIG_PATH`.
To support compression on the HTTP statistics channel, the server must be
linked against libzlib. If this is installed in a nonstandard location,
@@ -211,10 +219,11 @@ 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 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`.
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`.
For DNSTAP packet logging, you must have installed libfstrm
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
@@ -253,11 +262,8 @@ default, installation is into /usr/local, but this can be changed with the
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`. 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`.
to set the default parent directory of `run/named.pid`. `--sysconfdir`
defaults to `$prefix/etc` and `--localstatedir` defaults to `$prefix/var`.
### <a name="testing"/> Automated testing
@@ -323,6 +329,25 @@ 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 senstive.
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
Vendored
+89
View File
@@ -288,9 +288,98 @@ 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])
+5 -4
View File
@@ -16,15 +16,16 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
${ISC_INCLUDES} @OPENSSL_INCLUDES@
${ISC_INCLUDES} \
${OPENSSL_CFLAGS}
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_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}
BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@
+1 -3
View File
@@ -140,8 +140,6 @@ 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,
@@ -666,7 +664,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));
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
dns_zone_setdbtype(zone, 1, (const char * const *) dbtype);
CHECK(dns_zone_setfile(zone, filename, fileformat,
&dns_master_style_default));
if (journal != NULL)
+5
View File
@@ -86,6 +86,11 @@ Check "core" configuration only\&. This suppresses the loading of plugin modules
statements to be ignored\&.
.RE
.PP
\-i
.RS 4
Ignore warnings on deprecated options\&.
.RE
.PP
\-p
.RS 4
Print out the
+13 -2
View File
@@ -28,6 +28,7 @@
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <isccfg/grammar.h>
#include <bind9/check.h>
@@ -61,7 +62,7 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
fprintf(stderr, "usage: %s [-chjlvz] [-p [-x]] [-t directory] "
fprintf(stderr, "usage: %s [-chijlvz] [-p [-x]] [-t directory] "
"[named.conf]\n", program);
exit(1);
}
@@ -555,6 +556,7 @@ 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;
@@ -562,7 +564,7 @@ main(int argc, char **argv) {
/*
* Process memory debugging argument first.
*/
#define CMDLINE_FLAGS "cdhjlm:t:pvxz"
#define CMDLINE_FLAGS "cdhijlm:t:pvxz"
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (c) {
case 'm':
@@ -595,6 +597,10 @@ main(int argc, char **argv) {
debug++;
break;
case 'i':
nodeprecate = true;
break;
case 'j':
nomerge = false;
break;
@@ -675,11 +681,16 @@ 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) {
+9
View File
@@ -126,6 +126,15 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-i</term>
<listitem>
<para>
Ignore warnings on deprecated options.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p</term>
<listitem>
+6
View File
@@ -96,6 +96,12 @@
<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>
+3 -3
View File
@@ -27,9 +27,9 @@ CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @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@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
-2
View File
@@ -222,8 +222,6 @@ 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;
}
-2
View File
@@ -222,8 +222,6 @@ 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);
+5 -4
View File
@@ -16,16 +16,17 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @OPENSSL_INCLUDES@
${IRS_INCLUDES} ${ISCCFG_INCLUDES} \
${OPENSSL_CFLAGS}
CDEFINES = -DVERSION=\"${VERSION}\" \
-DSYSCONFDIR=\"${sysconfdir}\"
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
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}
IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+13 -22
View File
@@ -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, 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\&.
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\&.
.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\&. 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\&.
options\&.
.sp
Note: When reading the trust anchor file,
\fBdelv\fR
treats
\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\&.
\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
\fBdelv\fR
will not consult the managed\-keys database maintained by
as if it had been configured as a
\fBstatic\-key\fR\&.
\fBdelv\fR
does 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,25 +390,16 @@ 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
and
\fB+nodlv\fR\&.
\fB+noroot\fR\&.
.RE
.PP
\fB+[no]root[=ROOT]\fR
.RS 4
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
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
\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\&.
+168 -132
View File
@@ -111,7 +111,8 @@ static bool
nottl = false,
multiline = false,
short_form = false,
print_unknown_format = false;
print_unknown_format = false,
yaml = false;
static bool
resolve_trace = false,
@@ -125,21 +126,19 @@ static bool
static bool
cdflag = false,
no_sigs = false,
root_validation = true,
dlv_validation = true;
root_validation = true;
static bool use_tcp = false;
static char *anchorfile = NULL;
static char *trust_anchor = NULL;
static char *dlv_anchor = NULL;
static int trusted_keys = 0;
static int num_keys = 0;
static dns_fixedname_t afn, dfn;
static dns_name_t *anchor_name = NULL, *dlv_name = NULL;
static dns_fixedname_t afn;
static dns_name_t *anchor_name = NULL;
/* Default bind.keys contents */
static char anchortext[] = MANAGED_KEYS;
static char anchortext[] = DNSSEC_KEYS;
/*
* Static function prototypes
@@ -161,7 +160,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 and dlv trust anchors)\n"
" -a anchor-file (specify root trust anchor)\n"
" -b address[#port] (bind to source address/port)\n"
" -p port (specify port number)\n"
" -q name (specify query name)\n"
@@ -181,7 +180,8 @@ 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 +190,7 @@ usage(void) {
" +[no]rtrace (Trace resolver fetches)\n"
" +[no]mtrace (Trace messages received)\n"
" +[no]vtrace (Trace validation process)\n"
" +[no]dlv (DNSSEC lookaside validation anchor)\n"
" +[no]dlv (Obsolete)\n"
" +[no]root (DNSSEC validation trust anchor)\n"
" +[no]dnssec (Display DNSSEC records)\n"
" -h (print help and exit)\n"
@@ -354,53 +354,80 @@ setup_logging(FILE *errout) {
static void
print_status(dns_rdataset_t *rdataset) {
const char *astr = "", *tstr = "";
char buf[1024] = { 0 };
REQUIRE(rdataset != NULL);
if (!showtrust || !dns_rdataset_isassociated(rdataset))
if (!showtrust || !dns_rdataset_isassociated(rdataset)) {
return;
}
if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0)
astr = "negative response, ";
buf[0] = '\0';
if ((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0) {
strlcat(buf, "negative response", sizeof(buf));
strlcat(buf, (yaml ? "_" : ", "), sizeof(buf));
}
switch (rdataset->trust) {
case dns_trust_none:
tstr = "untrusted";
strlcat(buf, "untrusted", sizeof(buf));
break;
case dns_trust_pending_additional:
tstr = "signed additional data, pending validation";
strlcat(buf, "signed additional data", sizeof(buf));
if (!yaml) {
strlcat(buf, ", ", sizeof(buf));
}
strlcat(buf, "pending validation", sizeof(buf));
break;
case dns_trust_pending_answer:
tstr = "signed answer, pending validation";
strlcat(buf, "signed answer", sizeof(buf));
if (!yaml) {
strlcat(buf, ", ", sizeof(buf));
}
strlcat(buf, "pending validation", sizeof(buf));
break;
case dns_trust_additional:
tstr = "unsigned additional data";
strlcat(buf, "unsigned additional data", sizeof(buf));
break;
case dns_trust_glue:
tstr = "glue data";
strlcat(buf, "glue data", sizeof(buf));
break;
case dns_trust_answer:
if (root_validation || dlv_validation)
tstr = "unsigned answer";
else
tstr = "answer not validated";
if (root_validation) {
strlcat(buf, "unsigned answer", sizeof(buf));
} else {
strlcat(buf, "answer not validated", sizeof(buf));
}
break;
case dns_trust_authauthority:
tstr = "authority data";
strlcat(buf, "authority data", sizeof(buf));
break;
case dns_trust_authanswer:
tstr = "authoritative";
strlcat(buf, "authoritative", sizeof(buf));
break;
case dns_trust_secure:
tstr = "fully validated";
strlcat(buf, "fully validated", sizeof(buf));
break;
case dns_trust_ultimate:
tstr = "ultimate trust";
strlcat(buf, "ultimate trust", sizeof(buf));
break;
}
printf("; %s%s\n", astr, tstr);
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);
}
}
static isc_result_t
@@ -427,8 +454,9 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
return (ISC_R_SUCCESS);
if (first || rdataset->trust != trust) {
if (!first && showtrust && !short_form)
if (!first && showtrust && !short_form && !yaml) {
putchar('\n');
}
print_status(rdataset);
trust = rdataset->trust;
first = false;
@@ -436,8 +464,6 @@ 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) {
@@ -469,9 +495,11 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
dns_rdata_reset(&rdata);
}
} else {
if ((rdataset->attributes &
DNS_RDATASETATTR_NEGATIVE) != 0)
if (!yaml && (rdataset->attributes &
DNS_RDATASETATTR_NEGATIVE) != 0)
{
isc_buffer_putstr(&target, "; ");
}
result = dns_master_rdatasettotext(owner, rdataset,
style, &target);
@@ -504,38 +532,52 @@ setup_style(dns_master_style_t **stylep) {
REQUIRE(stylep != NULL || *stylep == NULL);
styleflags |= DNS_STYLEFLAG_REL_OWNER;
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 (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 (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);
}
@@ -577,30 +619,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, match_dlv = false;
bool match_root = false;
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
CHECK(convert_name(&fkeyname, &keyname, keynamestr));
if (!root_validation && !dlv_validation)
if (!root_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 && !match_dlv)
if (!match_root) {
return (ISC_R_SUCCESS);
if ((!root_validation && match_root) || (!dlv_validation && match_dlv))
}
if (!root_validation && match_root) {
return (ISC_R_SUCCESS);
}
if (match_root)
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"));
@@ -642,7 +684,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
CHECK(dns_client_addtrustedkey(client, dns_rdataclass_in,
keyname, &rrdatabuf));
trusted_keys++;
num_keys++;
cleanup:
if (result == DST_R_NOCRYPTO)
@@ -693,13 +735,15 @@ static isc_result_t
setup_dnsseckeys(dns_client_t *client) {
isc_result_t result;
cfg_parser_t *parser = NULL;
const cfg_obj_t *keys = NULL;
const cfg_obj_t *trusted_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 && !dlv_validation)
if (!root_validation) {
return (ISC_R_SUCCESS);
}
if (filename == NULL) {
#ifndef WIN32
@@ -714,27 +758,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) {
@@ -744,26 +788,30 @@ setup_dnsseckeys(dns_client_t *client) {
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)
if (result != ISC_R_SUCCESS) {
fatal("Unable to parse built-in keys");
}
}
INSIST(bindkeys != NULL);
cfg_map_get(bindkeys, "trusted-keys", &keys);
cfg_map_get(bindkeys, "trusted-keys", &trusted_keys);
cfg_map_get(bindkeys, "managed-keys", &managed_keys);
cfg_map_get(bindkeys, "dnssec-keys", &dnssec_keys);
if (keys != NULL)
CHECK(load_keys(keys, client));
if (managed_keys != NULL)
if (trusted_keys != NULL) {
CHECK(load_keys(trusted_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 (trusted_keys == 0)
if (num_keys == 0) {
fatal("No trusted keys were loaded");
if (dlv_validation)
dns_client_setdlv(client, dns_rdataclass_in, dlv_anchor);
}
cleanup:
if (bindkeys != NULL) {
@@ -772,9 +820,10 @@ 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);
}
@@ -801,8 +850,6 @@ 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);
@@ -811,8 +858,6 @@ 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);
@@ -840,10 +885,6 @@ 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);
@@ -916,10 +957,6 @@ 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);
@@ -928,10 +965,6 @@ 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);
@@ -1027,13 +1060,10 @@ plus_option(char *option) {
switch (cmd[1]) {
case 'l': /* dlv */
FULLCHECK("dlv");
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");
if (state) {
fprintf(stderr, "Invalid option: "
"+dlv is obsolete\n");
exit(1);
}
break;
case 'n': /* dnssec */
@@ -1068,8 +1098,6 @@ 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 */
@@ -1157,6 +1185,13 @@ 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:
/*
@@ -1220,7 +1255,6 @@ 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':
@@ -1252,8 +1286,6 @@ 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, '#');
@@ -1317,8 +1349,6 @@ 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;
@@ -1346,8 +1376,6 @@ 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;
@@ -1494,8 +1522,6 @@ parse_args(int argc, char **argv) {
if (curqname == NULL) {
curqname = isc_mem_strdup(mctx, argv[0]);
if (curqname == NULL)
fatal("out of memory");
}
}
}
@@ -1509,8 +1535,6 @@ 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;
@@ -1594,6 +1618,7 @@ 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;
@@ -1622,9 +1647,9 @@ main(int argc, char *argv[]) {
fatal("failed to create mctx");
CHECK(isc_appctx_create(mctx, &actx));
CHECK(isc_taskmgr_createinctx(mctx, actx, 1, 0, &taskmgr));
CHECK(isc_socketmgr_createinctx(mctx, actx, &socketmgr));
CHECK(isc_timermgr_createinctx(mctx, actx, &timermgr));
CHECK(isc_taskmgr_createinctx(mctx, 1, 0, &taskmgr));
CHECK(isc_socketmgr_createinctx(mctx, &socketmgr));
CHECK(isc_timermgr_createinctx(mctx, &timermgr));
parse_args(argc, argv);
@@ -1665,22 +1690,35 @@ 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 && !dlv_validation)
}
if (!root_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)
if (result != ISC_R_SUCCESS && !yaml) {
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;
@@ -1697,8 +1735,6 @@ 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)
+25 -28
View File
@@ -96,7 +96,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, DS and DLV records
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
@@ -211,21 +211,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. 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.
<option>+root=NAME</option> options.
</para>
<para>
Note: When reading the trust anchor file,
<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
<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
and rolled over, it will be necessary to update
<filename>/etc/bind.keys</filename> to use DNSSEC
validation in <command>delv</command>.
@@ -617,8 +617,7 @@
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> and
<option>+nodlv</option>.
<option>-i</option> or <option>+noroot</option>.
</para>
</listitem>
</varlistentry>
@@ -627,7 +626,7 @@
<term><option>+[no]root[=ROOT]</option></term>
<listitem>
<para>
Indicates whether to perform conventional (non-lookaside)
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
@@ -638,18 +637,6 @@
</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>
@@ -671,6 +658,16 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]yaml</option></term>
<listitem>
<para>
Print response data in YAML format.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
+15 -25
View File
@@ -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, DS and DLV records
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
@@ -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. 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.
<code class="option">+root=NAME</code> options.
</p>
<p>
Note: When reading the trust anchor file,
<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
<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
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,14 +517,13 @@
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> and
<code class="option">+nodlv</code>.
<code class="option">-i</code> or <code class="option">+noroot</code>.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]root[=ROOT]</code></span></dt>
<dd>
<p>
Indicates whether to perform conventional (non-lookaside)
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
@@ -533,15 +532,6 @@
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>
+5 -4
View File
@@ -19,16 +19,17 @@ READLINE_LIB = @READLINE_LIB@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @OPENSSL_INCLUDES@
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ \
${OPENSSL_CFLAGS}
CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_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}
IRSLIBS = ../../lib/irs/libirs.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+16 -10
View File
@@ -361,14 +361,20 @@ 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 comment is printed by default\&.
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\&.
.RE
.PP
\fB+[no]comments\fR
.RS 4
Toggle the display of comment lines in the output\&. The default is to print comments\&.
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\&.
.RE
.PP
\fB+[no]cookie\fR\fB[=####]\fR
@@ -566,12 +572,12 @@ would cause a 48\-byte query to be padded to 64 bytes\&. The default block size
.PP
\fB+[no]qr\fR
.RS 4
Print [do not print] the query as it is sent\&. By default, the query is not printed\&.
Toggles the display of the query message as it is sent\&. By default, the query is not printed\&.
.RE
.PP
\fB+[no]question\fR
.RS 4
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\&.
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\&.
.RE
.PP
\fB+[no]raflag\fR
@@ -589,11 +595,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 the
normally sends recursive queries\&. Recursion is automatically disabled when using the
\fI+nssearch\fR
or
option, and when using
\fI+trace\fR
query options are used\&.
except for an initial recursive query to get the list of root servers\&.
.RE
.PP
\fB+retry=T\fR
@@ -624,7 +630,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\&.
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\&.
.RE
.PP
\fB+[no]showsearch\fR
@@ -654,7 +660,7 @@ causes fields not to be split at all\&. The default is 56 characters, or 44 char
.PP
\fB+[no]stats\fR
.RS 4
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\&.
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\&.
.RE
.PP
\fB+[no]subnet=addr[/prefix\-length]\fR
+240 -60
View File
@@ -64,7 +64,8 @@ static char hexcookie[81];
static bool short_form = false, printcmd = true,
plusquest = false, pluscomm = false,
ipv4only = false, ipv6only = false, digrc = true;
ipv4only = false, ipv6only = false, digrc = true,
yaml = false;
static uint32_t splitwidth = 0xffffffff;
/*% opcode text */
@@ -173,11 +174,13 @@ 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"
" +[no]comments (Control display of comment lines)\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]cookie (Add a COOKIE option to the request)\n"
" +[no]crypto (Control display of cryptographic "
"fields in records)\n"
" +[no]crypto (Control display of cryptographic\n"
" fields in records)\n"
" +[no]defname (Use search list (+[no]search))\n"
" +[no]dnssec (Request DNSSEC records)\n"
" +domain=### (Set default domainname)\n"
@@ -194,11 +197,13 @@ help(void) {
" +[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"
@@ -217,7 +222,7 @@ help(void) {
"comments)\n"
" +[no]search (Set whether to use searchlist)\n"
" +[no]short (Display nothing except short\n"
" form of answer)\n"
" form of answers - global option)\n"
" +[no]showsearch (Search with intermediate results)\n"
" +[no]split=## (Split hex/base64 fields into chunks)\n"
" +[no]stats (Control display of statistics)\n"
@@ -225,11 +230,13 @@ 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]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"
@@ -256,7 +263,11 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
if (query->lookup->stats && !short_form) {
if (short_form || yaml) {
return;
}
if (query->lookup->stats) {
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
if (query->lookup->use_usec)
printf(";; Query time: %ld usec\n", (long) diff);
@@ -277,11 +288,15 @@ 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, "
@@ -292,30 +307,32 @@ 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 && !short_form) {
} else if (query->lookup->identify) {
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);
}
}
}
@@ -354,20 +371,24 @@ 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);
}
@@ -407,8 +428,7 @@ 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");
@@ -450,62 +470,85 @@ 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, dns_message_t *msg, bool headers) {
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
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 (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->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)
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) {
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)
if (!short_form && printcmd) {
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",
@@ -526,13 +569,110 @@ printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
result = isc_buffer_allocate(mctx, &buf, len);
check_result(result, "isc_buffer_allocate");
if (query->lookup->comments && !short_form) {
if (query->lookup->cmdline[0] != 0)
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) {
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)) {
@@ -677,8 +817,9 @@ buftoosmall:
}
}
if (headers && query->lookup->comments && !short_form)
if (headers && query->lookup->comments && !short_form && !yaml) {
printf("\n");
}
printf("%.*s", (int)isc_buffer_usedlength(buf),
(char *)isc_buffer_base(buf));
@@ -1462,7 +1603,7 @@ plus_option(char *option, bool is_batchfile,
lookup->trace = state;
lookup->trace_root = state;
if (state) {
lookup->recurse = false;
lookup->recurse = true;
lookup->identify = true;
lookup->comments = false;
lookup->rrcomments = 0;
@@ -1536,6 +1677,15 @@ 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;
@@ -2248,8 +2398,37 @@ query_finished(void) {
}
}
void dig_setup(int argc, char **argv)
{
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");
}
}
void
dig_setup(int argc, char **argv) {
isc_result_t result;
ISC_LIST_INIT(lookup_list);
@@ -2263,6 +2442,7 @@ void dig_setup(int argc, char **argv)
dighost_received = received;
dighost_trying = trying;
dighost_shutdown = query_finished;
dighost_error = dig_error;
progname = argv[0];
preparse_args(argc, argv);
+40 -15
View File
@@ -593,9 +593,11 @@
<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
comment is printed by default.
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.
</para>
</listitem>
</varlistentry>
@@ -604,8 +606,18 @@
<term><option>+[no]comments</option></term>
<listitem>
<para>
Toggle the display of comment lines in the output.
The default is to print comments.
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>.
</para>
</listitem>
</varlistentry>
@@ -965,8 +977,8 @@
<term><option>+[no]qr</option></term>
<listitem>
<para>
Print [do not print] the query as it is sent. By
default, the query is not printed.
Toggles the display of the query message as it is sent.
By default, the query is not printed.
</para>
</listitem>
</varlistentry>
@@ -975,7 +987,7 @@
<term><option>+[no]question</option></term>
<listitem>
<para>
Print [do not print] the question section of a query
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.
</para>
@@ -1010,8 +1022,10 @@
in the query. This bit is set by default, which means
<command>dig</command> normally sends recursive
queries. Recursion is automatically disabled when
the <parameter>+nssearch</parameter> or
<parameter>+trace</parameter> query options are used.
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.
</para>
</listitem>
</varlistentry>
@@ -1064,7 +1078,9 @@
<listitem>
<para>
Provide a terse answer. The default is to print the
answer in a verbose form.
answer in a verbose form. This option always has global
effect; it cannot be set globally and then overridden on
a per-lookup basis.
</para>
</listitem>
</varlistentry>
@@ -1109,10 +1125,9 @@
<term><option>+[no]stats</option></term>
<listitem>
<para>
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.
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.
</para>
</listitem>
</varlistentry>
@@ -1277,6 +1292,16 @@
</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>
+30 -15
View File
@@ -481,16 +481,28 @@
<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
comment is printed by default.
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.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
<dd>
<p>
Toggle the display of comment lines in the output.
The default is to print comments.
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>.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt>
@@ -764,14 +776,14 @@
<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
<dd>
<p>
Print [do not print] the query as it is sent. By
default, the query is not printed.
Toggles the display of the query message 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>
Print [do not print] the question section of a query
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.
</p>
@@ -797,8 +809,10 @@
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
the <em class="parameter"><code>+nssearch</code></em> or
<em class="parameter"><code>+trace</code></em> query options are used.
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.
</p>
</dd>
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
@@ -839,7 +853,9 @@
<dd>
<p>
Provide a terse answer. The default is to print the
answer in a verbose form.
answer in a verbose form. This option always has global
effect; it cannot be set globally and then overridden on
a per-lookup basis.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
@@ -872,10 +888,9 @@
<dt><span class="term"><code class="option">+[no]stats</code></span></dt>
<dd>
<p>
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.
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.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt>
+55 -57
View File
@@ -193,11 +193,15 @@ dig_lookup_t *current_lookup = NULL;
/* dynamic callbacks */
isc_result_t
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg,
bool headers);
(*dighost_printmessage)(dig_query_t *query, const isc_buffer_t *msgbuf,
dns_message_t *msg, bool headers);
void
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query);
(*dighost_error)(const char *format, ...);
void
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from,
dig_query_t *query);
void
(*dighost_trying)(char *frm, dig_lookup_t *lookup);
@@ -446,9 +450,6 @@ 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);
@@ -576,9 +577,6 @@ 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;
@@ -681,8 +679,6 @@ 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;
@@ -696,10 +692,8 @@ 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);
if (looknew->ednsopts[i].value == NULL)
fatal("out of memory");
looknew->ednsopts[i].value = isc_mem_allocate(mctx,
len);
memmove(looknew->ednsopts[i].value,
lookold->ednsopts[i].value, len);
}
@@ -805,8 +799,6 @@ 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);
}
@@ -865,9 +857,6 @@ 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)
@@ -957,8 +946,6 @@ 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) {
@@ -1190,9 +1177,6 @@ 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);
@@ -1399,6 +1383,7 @@ 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 */
@@ -1456,9 +1441,7 @@ save_opt(dig_lookup_t *lookup, char *code, char *value) {
if (value != NULL) {
char *buf;
buf = isc_mem_allocate(mctx, strlen(value)/2 + 1);
if (buf == NULL)
fatal("out of memory");
buf = isc_mem_allocate(mctx, strlen(value) / 2 + 1);
isc_buffer_init(&b, buf, (unsigned int) strlen(value)/2 + 1);
result = isc_hex_decodestring(value, &b);
check_result(result, "isc_hex_decodestring");
@@ -2191,12 +2174,14 @@ 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, since
* it's meaningless for traces.
* If this is a trace request, completely disallow recursion after
* looking up the root name servers, 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 &&
@@ -2487,10 +2472,6 @@ 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;
@@ -2525,6 +2506,9 @@ 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);
@@ -2533,16 +2517,6 @@ 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);
}
@@ -2880,6 +2854,18 @@ 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) {
printf(";; QUERY SIZE: %u\n\n",
isc_buffer_usedlength(&query->lookup->renderbuf));
}
}
}
/*%
@@ -2979,11 +2965,11 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr);
isc_netaddr_format(&netaddr, buf, sizeof(buf));
printf(";; no response from %s\n", buf);
dighost_error("no response from %s\n", buf);
} else {
fputs(l->cmdline, stdout);
printf(";; connection timed out; no servers could be "
"reached\n");
dighost_error("connection timed out; "
"no servers could be reached\n");
}
cancel_lookup(l);
check_next_lookup(l);
@@ -3055,8 +3041,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));
printf(";; communications error to %s: %s\n",
sockstr, isc_result_totext(sevent->result));
dighost_error("communications error to %s: %s\n",
sockstr, isc_result_totext(sevent->result));
if (keep != NULL)
isc_socket_detach(&keep);
l = query->lookup;
@@ -3155,6 +3141,19 @@ 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) {
printf(";; QUERY SIZE: %u\n\n",
isc_buffer_usedlength(
&query->lookup->renderbuf));
}
}
}
query->waiting_connect = false;
#if 0
@@ -3529,7 +3528,6 @@ 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;
@@ -3558,8 +3556,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
debug("in recv cancel handler");
query->waiting_connect = false;
} else {
printf(";; communications error: %s\n",
isc_result_totext(sevent->result));
dighost_error("communications error: %s\n",
isc_result_totext(sevent->result));
if (keep != NULL)
isc_socket_detach(&keep);
isc_socket_detach(&query->sock);
@@ -3910,19 +3908,19 @@ recv_done(isc_task_t *task, isc_event_t *event) {
if (msg->rcode == dns_rcode_nxdomain &&
(l->origin != NULL || l->need_search)) {
if (!next_origin(query->lookup) || showsearch) {
dighost_printmessage(query, msg, true);
dighost_printmessage(query, &b, msg, true);
dighost_received(isc_buffer_usedlength(&b),
&sevent->address, query);
}
} else if (!l->trace && !l->ns_search_only) {
dighost_printmessage(query, msg, true);
dighost_printmessage(query, &b, 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, msg, true);
dighost_printmessage(query, &b, msg, true);
l->rdtype = l->qrdtype;
if (l->trace_root || (l->ns_search_only && count > 0)) {
@@ -3953,7 +3951,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
l->trace_root = false;
usesearch = false;
} else {
dighost_printmessage(query, msg, true);
dighost_printmessage(query, &b, msg, true);
}
}
}
+16 -1
View File
@@ -400,13 +400,16 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
}
static isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
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);
/*
@@ -854,6 +857,17 @@ parse_args(bool is_batchfile, int argc, char **argv) {
ISC_LIST_APPEND(lookup_list, lookup, link);
}
static void
host_error(const char *format, ...) {
va_list args;
printf(";; ");
va_start(args, format);
vfprintf(stdout, format, args);
va_end(args);
printf("\n");
}
int
main(int argc, char **argv) {
isc_result_t result;
@@ -871,6 +885,7 @@ main(int argc, char **argv) {
dighost_received = received;
dighost_trying = trying;
dighost_shutdown = host_shutdown;
dighost_error = host_error;
debug("main()");
progname = argv[0];
+11 -2
View File
@@ -380,13 +380,22 @@ set_search_domain(char *domain);
* then assigned to the appropriate function pointer
*/
extern isc_result_t
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, bool headers);
(*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 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
+19 -4
View File
@@ -429,16 +429,21 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
}
static isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
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);
@@ -850,8 +855,6 @@ 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
@@ -980,6 +983,17 @@ getinput(isc_task_t *task, isc_event_t *event) {
isc_app_shutdown();
}
static void
nsl_error(const char *format, ...) {
va_list args;
printf(";; ");
va_start(args, format);
vfprintf(stdout, format, args);
va_end(args);
printf("\n");
}
int
main(int argc, char **argv) {
isc_result_t result;
@@ -997,6 +1011,7 @@ main(int argc, char **argv) {
dighost_received = received;
dighost_trying = trying;
dighost_shutdown = query_finished;
dighost_error = nsl_error;
result = isc_app_start();
check_result(result, "isc_app_start");
+5 -4
View File
@@ -15,14 +15,15 @@ VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} \
${OPENSSL_CFLAGS}
CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
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}
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
-23
View File
@@ -530,9 +530,6 @@ 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;
@@ -610,10 +607,6 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
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);
@@ -747,10 +740,6 @@ 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);
@@ -835,10 +824,6 @@ 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;
@@ -907,10 +892,6 @@ 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;
@@ -926,10 +907,6 @@ 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);
+3 -18
View File
@@ -50,11 +50,9 @@ dnssec-dsfromkey \- DNSSEC DS RR generation tool
.PP
The
\fBdnssec\-dsfromkey\fR
command outputs DS (Delegation Signer) resource records (RRs) and other similarly\-constructed RRs: with the
\fB\-l\fR
option it outputs DLV (DNSSEC Lookaside Validation) RRs; or with the
command outputs DS (Delegation Signer) resource records (RRs), or CDS (Child DS) RRs with the
\fB\-C\fR
it outputs CDS (Child DS) RRs\&.
option\&.
.PP
The input keys can be specified in a number of ways:
.PP
@@ -119,9 +117,7 @@ zone file mode\&.
.PP
\-C
.RS 4
Generate CDS records rather than DS records\&. This is mutually exclusive with the
\fB\-l\fR
option for generating DLV records\&.
Generate CDS records rather than DS records\&.
.RE
.PP
\-f \fIfile\fR
@@ -156,15 +152,6 @@ files in
\fBdirectory\fR\&.
.RE
.PP
\-l \fIdomain\fR
.RS 4
Generate a DLV set instead of a DS set\&. The specified
\fIdomain\fR
is appended to the name for each record in the set\&. This is mutually exclusive with the
\fB\-C\fR
option for generating CDS records\&.
.RE
.PP
\-s
.RS 4
Keyset mode:
@@ -224,8 +211,6 @@ A keyfile error can give a "file not found" even if the file exists\&.
BIND 9 Administrator Reference Manual,
RFC 3658
(DS RRs),
RFC 4431
(DLV RRs),
RFC 4509
(SHA\-256 for DS RRs),
RFC 6605
+13 -40
View File
@@ -208,8 +208,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
}
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;
@@ -228,9 +227,7 @@ logkey(dns_rdata_t *rdata)
}
static void
emit(dns_dsdigest_t dt, bool showall, char *lookaside,
bool cds, dns_rdata_t *rdata)
{
emit(dns_dsdigest_t dt, bool showall, bool cds, dns_rdata_t *rdata) {
isc_result_t result;
unsigned char buf[DNS_DS_BUFFERSIZE];
char text_buf[DST_KEY_MAXTEXTSIZE];
@@ -262,18 +259,6 @@ emit(dns_dsdigest_t dt, bool showall, char *lookaside,
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);
@@ -293,26 +278,24 @@ emit(dns_dsdigest_t dt, bool showall, char *lookaside,
isc_buffer_usedregion(&classb, &r);
printf("%.*s", (int)r.length, r.base);
if (lookaside == NULL) {
if (cds)
printf(" CDS ");
else
printf(" DS ");
} else
printf(" DLV ");
if (cds) {
printf(" CDS ");
} else {
printf(" DS ");
}
isc_buffer_usedregion(&textb, &r);
printf("%.*s\n", (int)r.length, r.base);
}
static void
emits(bool showall, char *lookaside, bool cds, dns_rdata_t *rdata) {
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, lookaside, cds, rdata);
emit(dtype[i], showall, cds, rdata);
}
}
}
@@ -338,12 +321,11 @@ usage(void) {
" -f zonefile: read keys from a zone file\n"
" -h: print help information\n"
" -K directory: where to find key or keyset files\n"
" -l zone: print DLV records in the given lookaside zone\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, DLV, or CDS RRs\n");
fprintf(stderr, "Output: DS or CDS RRs\n");
exit (-1);
}
@@ -352,7 +334,6 @@ int
main(int argc, char **argv) {
char *classname = NULL;
char *filename = NULL, *dir = NULL, *namestr;
char *lookaside = NULL;
char *endp;
int ch;
bool cds = false;
@@ -397,9 +378,6 @@ main(int argc, char **argv) {
add_dtype(strtodsdigest(isc_commandline_argument));
break;
case 'C':
if (lookaside != NULL)
fatal("lookaside and CDS are mutually"
" exclusive");
cds = true;
break;
case 'c':
@@ -418,12 +396,7 @@ main(int argc, char **argv) {
filename = isc_commandline_argument;
break;
case 'l':
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");
fatal("-l option (DLV lookaside) is obsolete");
break;
case 's':
usekeyset = true;
@@ -528,7 +501,7 @@ main(int argc, char **argv) {
logkey(&rdata);
}
emits(showall, lookaside, cds, &rdata);
emits(showall, cds, &rdata);
}
} else {
unsigned char key_buf[DST_KEY_MAXSIZE];
@@ -536,7 +509,7 @@ main(int argc, char **argv) {
loadkey(argv[isc_commandline_index], key_buf,
DST_KEY_MAXSIZE, &rdata);
emits(showall, lookaside, cds, &rdata);
emits(showall, cds, &rdata);
}
if (dns_rdataset_isassociated(&rdataset)) {
+3 -21
View File
@@ -112,10 +112,8 @@
<para>
The <command>dnssec-dsfromkey</command> command outputs DS (Delegation
Signer) resource records (RRs) and other similarly-constructed RRs:
with the <option>-l</option> option it outputs DLV (DNSSEC Lookaside
Validation) RRs; or with the <option>-C</option> it outputs CDS (Child
DS) RRs.
Signer) resource records (RRs), or CDS (Child DS) RRs with the
<option>-C</option> option.
</para>
<para>
@@ -212,9 +210,7 @@
<term>-C</term>
<listitem>
<para>
Generate CDS records rather than DS records. This is mutually
exclusive with the <option>-l</option> option for generating DLV
records.
Generate CDS records rather than DS records.
</para>
</listitem>
</varlistentry>
@@ -260,19 +256,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-l <replaceable class="parameter">domain</replaceable></term>
<listitem>
<para>
Generate a DLV set instead of a DS set. The specified
<replaceable>domain</replaceable> is appended to the name for each
record in the set.
This is mutually exclusive with the <option>-C</option> option
for generating CDS records.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s</term>
<listitem>
@@ -362,7 +345,6 @@
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
<citetitle>RFC 3658</citetitle> (DS RRs),
<citetitle>RFC 4431</citetitle> (DLV 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).
+3 -18
View File
@@ -97,10 +97,8 @@
<p>
The <span class="command"><strong>dnssec-dsfromkey</strong></span> command outputs DS (Delegation
Signer) resource records (RRs) and other similarly-constructed RRs:
with the <code class="option">-l</code> option it outputs DLV (DNSSEC Lookaside
Validation) RRs; or with the <code class="option">-C</code> it outputs CDS (Child
DS) RRs.
Signer) resource records (RRs), or CDS (Child DS) RRs with the
<code class="option">-C</code> option.
</p>
<p>
@@ -182,9 +180,7 @@
<dt><span class="term">-C</span></dt>
<dd>
<p>
Generate CDS records rather than DS records. This is mutually
exclusive with the <code class="option">-l</code> option for generating DLV
records.
Generate CDS records rather than DS records.
</p>
</dd>
<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
@@ -219,16 +215,6 @@
<code class="option">directory</code>.
</p>
</dd>
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
<dd>
<p>
Generate a DLV set instead of a DS set. The specified
<em class="replaceable"><code>domain</code></em> is appended to the name for each
record in the set.
This is mutually exclusive with the <code class="option">-C</code> option
for generating CDS records.
</p>
</dd>
<dt><span class="term">-s</span></dt>
<dd>
<p>
@@ -311,7 +297,6 @@
</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 3658</em> (DS RRs),
<em class="citetitle">RFC 4431</em> (DLV 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).
-2
View File
@@ -368,8 +368,6 @@ main(int argc, char **argv) {
len = strlen(label) + 8;
l = isc_mem_allocate(mctx, len);
if (l == NULL)
fatal("cannot allocate memory");
snprintf(l, len, "pkcs11:%s", label);
isc_mem_free(mctx, label);
label = l;
+1 -2
View File
@@ -92,8 +92,7 @@ to generate TSIG keys\&.
.RS 4
Specifies the number of bits in the key\&. The choice of key size depends on the algorithm used\&. RSA keys must be between 1024 and 4096 bits\&. Diffie Hellman keys must be between 128 and 4096 bits\&. Elliptic curve algorithms don\*(Aqt need this parameter\&.
.sp
If the key size is not specified, some algorithms have pre\-defined defaults\&. For example, RSA keys for use as DNSSEC zone signing keys have a default size of 1024 bits; RSA keys for use as key signing keys (KSKs, generated with
\fB\-f KSK\fR) default to 2048 bits\&.
If the key size is not specified, some algorithms have pre\-defined defaults\&. For instance, RSA keys have a default size of 2048 bits\&.
.RE
.PP
\-C
+1 -6
View File
@@ -218,7 +218,6 @@ main(int argc, char **argv) {
bool unsetrev = false, unsetinact = false;
bool unsetdel = false;
bool genonly = false;
bool quiet = false;
bool show_progress = false;
unsigned char c;
isc_stdtime_t syncadd = 0, syncdel = 0;
@@ -554,11 +553,7 @@ main(int argc, char **argv) {
case DST_ALG_NSEC3RSASHA1:
case DST_ALG_RSASHA256:
case DST_ALG_RSASHA512:
if ((kskflag & DNS_KEYFLAG_KSK) != 0) {
size = 2048;
} else {
size = 1024;
}
size = 2048;
if (verbose > 0) {
fprintf(stderr, "key size not "
"specified; defaulting"
+2 -4
View File
@@ -176,10 +176,8 @@
</para>
<para>
If the key size is not specified, some algorithms have
pre-defined defaults. For example, RSA keys for use as
DNSSEC zone signing keys have a default size of 1024 bits;
RSA keys for use as key signing keys (KSKs, generated with
<option>-f KSK</option>) default to 2048 bits.
pre-defined defaults. For instance, RSA keys have a default
size of 2048 bits.
</para>
</listitem>
</varlistentry>
+2 -4
View File
@@ -145,10 +145,8 @@
</p>
<p>
If the key size is not specified, some algorithms have
pre-defined defaults. For example, RSA keys for use as
DNSSEC zone signing keys have a default size of 1024 bits;
RSA keys for use as key signing keys (KSKs, generated with
<code class="option">-f KSK</code>) default to 2048 bits.
pre-defined defaults. For instance, RSA keys have a default
size of 2048 bits.
</p>
</dd>
<dt><span class="term">-C</span></dt>
-4
View File
@@ -113,10 +113,6 @@ main(int argc, char **argv) {
* simplify cleanup later
*/
dir = isc_mem_strdup(mctx, isc_commandline_argument);
if (dir == NULL) {
fatal("Failed to allocate memory for "
"directory");
}
break;
case 'r':
removefile = true;
-4
View File
@@ -253,10 +253,6 @@ main(int argc, char **argv) {
*/
directory = isc_mem_strdup(mctx,
isc_commandline_argument);
if (directory == NULL) {
fatal("Failed to allocate memory for "
"directory");
}
break;
case 'L':
ttl = strtottl(isc_commandline_argument);
+8 -6
View File
@@ -39,7 +39,7 @@
dnssec-signzone \- DNSSEC zone signing tool
.SH "SYNOPSIS"
.HP \w'\fBdnssec\-signzone\fR\ 'u
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-Q\fR] [\fB\-R\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-Q\fR] [\fB\-q\fR] [\fB\-R\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
.SH "DESCRIPTION"
.PP
\fBdnssec\-signzone\fR
@@ -113,11 +113,6 @@ Key repository: Specify a directory to search for DNSSEC keys\&. If not specifie
Treat specified key as a key signing key ignoring any key flags\&. This option may be specified multiple times\&.
.RE
.PP
\-l \fIdomain\fR
.RS 4
Generate a DLV set in addition to the key (DNSKEY) and DS sets\&. The domain is appended to the name of the records\&.
.RE
.PP
\-M \fImaxttl\fR
.RS 4
Sets the maximum TTL for the signed zone\&. Any TTL higher than
@@ -296,6 +291,13 @@ forces
to remove signatures from keys that are no longer active\&. This enables ZSK rollover using the procedure described in RFC 4641, section 4\&.2\&.1\&.1 ("Pre\-Publish Key Rollover")\&.
.RE
.PP
\-q
.RS 4
Quiet mode: Suppresses unnecessary output\&. Without this option, when
\fBdnssec\-signzone\fR
is run it will print to standard output the number of keys in use, the algorithms used to verify the zone was signed correctly and other status information, and finally the filename containing the signed zone\&. With it, that output is suppressed, leaving only the filename\&.
.RE
.PP
\-R
.RS 4
Remove signatures from keys that are no longer published\&.
+36 -59
View File
@@ -32,6 +32,7 @@
#include <unistd.h>
#include <isc/app.h>
#include <isc/atomic.h>
#include <isc/base32.h>
#include <isc/commandline.h>
#include <isc/event.h>
@@ -45,8 +46,8 @@
#include <isc/print.h>
#include <isc/random.h>
#include <isc/rwlock.h>
#include <isc/serial.h>
#include <isc/safe.h>
#include <isc/serial.h>
#include <isc/stdio.h>
#include <isc/string.h>
#include <isc/task.h>
@@ -155,14 +156,13 @@ static unsigned char *gsalt = saltbuf;
static size_t salt_length = 0;
static isc_task_t *master = NULL;
static unsigned int ntasks = 0;
static bool shuttingdown = false, finished = false;
static atomic_bool shuttingdown;
static atomic_bool finished;
static bool nokeys = false;
static bool removefile = false;
static bool generateds = false;
static bool ignore_kskflag = false;
static bool keyset_kskonly = false;
static dns_name_t *dlv = NULL;
static dns_fixedname_t dlv_fixed;
static dns_master_style_t *dsstyle = NULL;
static unsigned int serialformat = SOA_SERIAL_KEEP;
static unsigned int hash_length = 0;
@@ -1454,11 +1454,12 @@ signapex(void) {
cleannode(gdb, gversion, node);
dns_db_detachnode(gdb, &node);
result = dns_dbiterator_first(gdbiter);
if (result == ISC_R_NOMORE)
finished = true;
else if (result != ISC_R_SUCCESS)
if (result == ISC_R_NOMORE) {
atomic_store(&finished, true);
} else if (result != ISC_R_SUCCESS) {
fatal("failure iterating database: %s",
isc_result_totext(result));
}
}
/*%
@@ -1478,11 +1479,12 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
static dns_fixedname_t fzonecut; /* Protected by namelock. */
static unsigned int ended = 0; /* Protected by namelock. */
if (shuttingdown)
if (atomic_load(&shuttingdown)) {
return;
}
LOCK(&namelock);
if (finished) {
if (atomic_load(&finished)) {
ended++;
if (ended == ntasks) {
isc_task_detach(&task);
@@ -1492,8 +1494,6 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
}
fname = isc_mem_get(mctx, sizeof(dns_fixedname_t));
if (fname == NULL)
fatal("out of memory");
name = dns_fixedname_initname(fname);
node = NULL;
found = false;
@@ -1552,7 +1552,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
next:
result = dns_dbiterator_next(gdbiter);
if (result == ISC_R_NOMORE) {
finished = true;
atomic_store(&finished, true);
break;
} else if (result != ISC_R_SUCCESS)
fatal("failure iterating database: %s",
@@ -2643,11 +2643,13 @@ loadexplicitkeys(char *keyfiles[], int n, bool setksk) {
static void
report(const char *format, ...) {
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
va_end(args);
putc('\n', stderr);
if (!quiet) {
FILE *out = output_stdout ? stderr : stdout;
va_list args;
va_start(args, format);
vfprintf(out, format, args);
va_end(args);
}
}
static void
@@ -2902,7 +2904,6 @@ writeset(const char *prefix, dns_rdatatype_t type) {
dns_dbversion_t *dbversion = NULL;
dns_diff_t diff;
dns_difftuple_t *tuple = NULL;
dns_fixedname_t fixed;
dns_name_t *name;
dns_rdata_t rdata, ds;
bool have_ksk = false;
@@ -2926,8 +2927,6 @@ writeset(const char *prefix, dns_rdatatype_t type) {
if (dsdir != NULL)
filenamelen += strlen(dsdir) + 1;
filename = isc_mem_get(mctx, filenamelen);
if (filename == NULL)
fatal("out of memory");
if (dsdir != NULL)
snprintf(filename, filenamelen, "%s/", dsdir);
else
@@ -2937,18 +2936,7 @@ writeset(const char *prefix, dns_rdatatype_t type) {
dns_diff_init(mctx, &diff);
if (type == dns_rdatatype_dlv) {
dns_name_t tname;
unsigned int labels;
dns_name_init(&tname, NULL);
name = dns_fixedname_initname(&fixed);
labels = dns_name_countlabels(gorigin);
dns_name_getlabelsequence(gorigin, 0, labels - 1, &tname);
result = dns_name_concatenate(&tname, dlv, name, NULL);
check_result(result, "dns_name_concatenate");
} else
name = gorigin;
name = gorigin;
for (key = ISC_LIST_HEAD(keylist);
key != NULL;
@@ -2989,8 +2977,6 @@ writeset(const char *prefix, dns_rdatatype_t type) {
DNS_DSDIGEST_SHA256,
dsbuf, &ds);
check_result(result, "dns_ds_buildrdata");
if (type == dns_rdatatype_dlv)
ds.type = dns_rdatatype_dlv;
result = dns_difftuple_create(mctx,
DNS_DIFFOP_ADDRESIGN,
name, 0, &ds, &tuple);
@@ -3085,6 +3071,7 @@ usage(void) {
fprintf(stderr, "\t-j jitter:\n");
fprintf(stderr, "\t\trandomize signature end time up to jitter seconds\n");
fprintf(stderr, "\t-v debuglevel (0)\n");
fprintf(stderr, "\t-q quiet\n");
fprintf(stderr, "\t-V:\tprint version information\n");
fprintf(stderr, "\t-o origin:\n");
fprintf(stderr, "\t\tzone origin (name of zonefile)\n");
@@ -3127,7 +3114,6 @@ usage(void) {
"\t\twith older versions of dnssec-signzone -g\n");
fprintf(stderr, "\t-n ncpus (number of cpus present)\n");
fprintf(stderr, "\t-k key_signing_key\n");
fprintf(stderr, "\t-l lookasidezone\n");
fprintf(stderr, "\t-3 NSEC3 salt\n");
fprintf(stderr, "\t-H NSEC3 iterations (10)\n");
fprintf(stderr, "\t-A NSEC3 optout\n");
@@ -3203,8 +3189,6 @@ main(int argc, char *argv[]) {
int tempfilelen = 0;
dns_rdataclass_t rdclass;
isc_task_t **tasks = NULL;
isc_buffer_t b;
int len;
hashlist_t hashlist;
bool make_keyset = false;
bool set_salt = false;
@@ -3212,9 +3196,12 @@ main(int argc, char *argv[]) {
bool set_iter = false;
bool nonsecify = false;
atomic_init(&shuttingdown, false);
atomic_init(&finished, false);
/* Unused letters: Bb G J q Yy (and F is reserved). */
#define CMDLINE_FLAGS \
"3:AaCc:Dd:E:e:f:FghH:i:I:j:K:k:L:l:m:M:n:N:o:O:PpQRr:s:ST:tuUv:VX:xzZ:"
"3:AaCc:Dd:E:e:f:FghH:i:I:j:K:k:L:l:m:M:n:N:o:O:PpQqRr:s:ST:tuUv:VX:xzZ:"
/*
* Process memory debugging argument first.
@@ -3379,14 +3366,7 @@ main(int argc, char *argv[]) {
break;
case 'l':
len = strlen(isc_commandline_argument);
isc_buffer_init(&b, isc_commandline_argument, len);
isc_buffer_add(&b, len);
dlv = dns_fixedname_initname(&dlv_fixed);
result = dns_name_fromtext(dlv, &b, dns_rootname, 0,
NULL);
check_result(result, "dns_name_fromtext(dlv)");
fatal("-l option (DLV lookaside) is obsolete");
break;
case 'M':
@@ -3475,6 +3455,10 @@ main(int argc, char *argv[]) {
fatal("verbose level must be numeric");
break;
case 'q':
quiet = true;
break;
case 'X':
dnskey_endstr = isc_commandline_argument;
break;
@@ -3574,8 +3558,6 @@ main(int argc, char *argv[]) {
free_output = true;
size = strlen(file) + strlen(".signed") + 1;
output = isc_mem_allocate(mctx, size);
if (output == NULL)
fatal("out of memory");
snprintf(output, size, "%s.signed", file);
}
@@ -3790,10 +3772,8 @@ main(int argc, char *argv[]) {
if (!nokeys) {
writeset("dsset-", dns_rdatatype_ds);
if (make_keyset)
if (make_keyset) {
writeset("keyset-", dns_rdatatype_dnskey);
if (dlv != NULL) {
writeset("dlvset-", dns_rdatatype_dlv);
}
}
@@ -3804,8 +3784,6 @@ main(int argc, char *argv[]) {
} else {
tempfilelen = strlen(output) + 20;
tempfile = isc_mem_get(mctx, tempfilelen);
if (tempfile == NULL)
fatal("out of memory");
result = isc_file_mktemplate(output, tempfile, tempfilelen);
check_result(result, "isc_file_mktemplate");
@@ -3835,8 +3813,6 @@ main(int argc, char *argv[]) {
fatal("failed to create task: %s", isc_result_totext(result));
tasks = isc_mem_get(mctx, ntasks * sizeof(isc_task_t *));
if (tasks == NULL)
fatal("out of memory");
for (i = 0; i < (int)ntasks; i++) {
tasks[i] = NULL;
result = isc_task_create(taskmgr, 0, &tasks[i]);
@@ -3854,7 +3830,7 @@ main(int argc, char *argv[]) {
presign();
TIME_NOW(&sign_start);
signapex();
if (!finished) {
if (!atomic_load(&finished)) {
/*
* There is more work to do. Spread it out over multiple
* processors if possible.
@@ -3867,11 +3843,12 @@ main(int argc, char *argv[]) {
isc_result_totext(result));
}
(void)isc_app_run();
if (!finished)
if (!atomic_load(&finished)) {
fatal("process aborted by user");
}
} else
isc_task_detach(&master);
shuttingdown = true;
atomic_store(&shuttingdown, true);;
for (i = 0; i < (int)ntasks; i++)
isc_task_detach(&tasks[i]);
isc_taskmgr_destroy(&taskmgr);
@@ -3884,7 +3861,7 @@ main(int argc, char *argv[]) {
} else {
vresult = dns_zoneverify_dnssec(NULL, gdb, gversion, gorigin,
NULL, mctx, ignore_kskflag,
keyset_kskonly);
keyset_kskonly, report);
if (vresult != ISC_R_SUCCESS) {
fprintf(output_stdout ? stderr : stdout,
"Zone verification failed (%s)\n",
+17 -10
View File
@@ -80,6 +80,7 @@
<arg choice="opt" rep="norepeat"><option>-O <replaceable class="parameter">output-format</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-P</option></arg>
<arg choice="opt" rep="norepeat"><option>-Q</option></arg>
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
<arg choice="opt" rep="norepeat"><option>-R</option></arg>
<arg choice="opt" rep="norepeat"><option>-S</option></arg>
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
@@ -223,16 +224,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-l <replaceable class="parameter">domain</replaceable></term>
<listitem>
<para>
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
The domain is appended to the name of the records.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-M <replaceable class="parameter">maxttl</replaceable></term>
<listitem>
@@ -543,6 +534,22 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-q</term>
<listitem>
<para>
Quiet mode: Suppresses unnecessary output. Without this
option, when <command>dnssec-signzone</command> is run it
will print to standard output the number of keys in use,
the algorithms used to verify the zone was signed correctly
and other status information, and finally the filename
containing the signed zone. With it, that output is
suppressed, leaving only the filename.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-R</term>
<listitem>
+13 -7
View File
@@ -55,6 +55,7 @@
[<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>]
[<code class="option">-P</code>]
[<code class="option">-Q</code>]
[<code class="option">-q</code>]
[<code class="option">-R</code>]
[<code class="option">-S</code>]
[<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>]
@@ -173,13 +174,6 @@
key flags. This option may be specified multiple times.
</p>
</dd>
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
<dd>
<p>
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
The domain is appended to the name of the records.
</p>
</dd>
<dt><span class="term">-M <em class="replaceable"><code>maxttl</code></em></span></dt>
<dd>
<p>
@@ -429,6 +423,18 @@
RFC 4641, section 4.2.1.1 ("Pre-Publish Key Rollover").
</p>
</dd>
<dt><span class="term">-q</span></dt>
<dd>
<p>
Quiet mode: Suppresses unnecessary output. Without this
option, when <span class="command"><strong>dnssec-signzone</strong></span> is run it
will print to standard output the number of keys in use,
the algorithms used to verify the zone was signed correctly
and other status information, and finally the filename
containing the signed zone. With it, that output is
suppressed, leaving only the filename.
</p>
</dd>
<dt><span class="term">-R</span></dt>
<dd>
<p>
+8 -1
View File
@@ -39,7 +39,7 @@
dnssec-verify \- DNSSEC zone verification tool
.SH "SYNOPSIS"
.HP \w'\fBdnssec\-verify\fR\ 'u
\fBdnssec\-verify\fR [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-x\fR] [\fB\-z\fR] {zonefile}
\fBdnssec\-verify\fR [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-q\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-x\fR] [\fB\-z\fR] {zonefile}
.SH "DESCRIPTION"
.PP
\fBdnssec\-verify\fR
@@ -81,6 +81,13 @@ Sets the debugging level\&.
Prints version information\&.
.RE
.PP
\-q
.RS 4
Quiet mode: Suppresses output\&. Without this option, when
\fBdnssec\-verify\fR
is run it will print to standard output the number of keys in use, the algorithms used to verify the zone was signed correctly and other status information\&. With it, all non\-error output is suppressed, and only the exit code will indicate success\&.
.RE
.PP
\-x
.RS 4
Only verify that the DNSKEY RRset is signed with key\-signing keys\&. Without this flag, it is assumed that the DNSKEY RRset will be signed by all active keys\&. When this flag is set, it will not be an error if the DNSKEY RRset is not signed by zone\-signing keys\&. This corresponds to the
+19 -3
View File
@@ -78,6 +78,16 @@ static dns_name_t *gorigin; /* The database origin */
static bool ignore_kskflag = false;
static bool keyset_kskonly = false;
static void
report(const char *format, ...) {
if (!quiet) {
va_list args;
va_start(args, format);
vfprintf(stdout, format, args);
va_end(args);
}
}
/*%
* Load the zone file from disk
*/
@@ -140,6 +150,7 @@ usage(void) {
fprintf(stderr, "Options: (default value in parenthesis) \n");
fprintf(stderr, "\t-v debuglevel (0)\n");
fprintf(stderr, "\t-q quiet\n");
fprintf(stderr, "\t-V:\tprint version information\n");
fprintf(stderr, "\t-o origin:\n");
fprintf(stderr, "\t\tzone origin (name of zonefile)\n");
@@ -172,7 +183,7 @@ main(int argc, char *argv[]) {
int ch;
#define CMDLINE_FLAGS \
"hm:o:I:c:E:v:Vxz"
"c:E:hm:o:I:qv:Vxz"
/*
* Process memory debugging argument first.
@@ -237,6 +248,10 @@ main(int argc, char *argv[]) {
fatal("verbose level must be numeric");
break;
case 'q':
quiet = true;
break;
case 'x':
keyset_kskonly = true;
break;
@@ -304,7 +319,7 @@ main(int argc, char *argv[]) {
}
gdb = NULL;
fprintf(stderr, "Loading zone '%s' from file '%s'\n", origin, file);
report("Loading zone '%s' from file '%s'\n", origin, file);
loadzone(file, origin, rdclass, &gdb);
gorigin = dns_db_origin(gdb);
gclass = dns_db_class(gdb);
@@ -314,7 +329,8 @@ main(int argc, char *argv[]) {
check_result(result, "dns_db_newversion()");
result = dns_zoneverify_dnssec(NULL, gdb, gversion, gorigin, NULL,
mctx, ignore_kskflag, keyset_kskonly);
mctx, ignore_kskflag, keyset_kskonly,
report);
dns_db_closeversion(gdb, &gversion, false);
dns_db_detach(&gdb);
+15
View File
@@ -49,6 +49,7 @@
<arg choice="opt" rep="norepeat"><option>-E <replaceable class="parameter">engine</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-I <replaceable class="parameter">input-format</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
<arg choice="opt" rep="norepeat"><option>-x</option></arg>
@@ -140,6 +141,20 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-q</term>
<listitem>
<para>
Quiet mode: Suppresses output. Without this option, when
<command>dnssec-verify</command> is run it will print to
standard output the number of keys in use, the algorithms
used to verify the zone was signed correctly and other
status information. With it, all non-error output is
suppressed, and only the exit code will indicate success.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-x</term>
<listitem>
+12
View File
@@ -37,6 +37,7 @@
[<code class="option">-E <em class="replaceable"><code>engine</code></em></code>]
[<code class="option">-I <em class="replaceable"><code>input-format</code></em></code>]
[<code class="option">-o <em class="replaceable"><code>origin</code></em></code>]
[<code class="option">-q</code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-V</code>]
[<code class="option">-x</code>]
@@ -112,6 +113,17 @@
Prints version information.
</p>
</dd>
<dt><span class="term">-q</span></dt>
<dd>
<p>
Quiet mode: Suppresses output. Without this option, when
<span class="command"><strong>dnssec-verify</strong></span> is run it will print to
standard output the number of keys in use, the algorithms
used to verify the zone was signed correctly and other
status information. With it, all non-error output is
suppressed, and only the exit code will indicate success.
</p>
</dd>
<dt><span class="term">-x</span></dt>
<dd>
<p>
+2 -1
View File
@@ -57,7 +57,8 @@
#include "dnssectool.h"
int verbose;
int verbose = 0;
bool quiet = false;
uint8_t dtype[8];
static fatalcallback_t *fatalcallback = NULL;
+2 -1
View File
@@ -25,8 +25,9 @@
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
/*! verbosity: set by -v option in each program, defined in dnssectool.c */
/*! verbosity: set by -v and -q option in each program, defined in dnssectool.c */
extern int verbose;
extern bool quiet;
/*! program name, statically initialized in each program */
extern const char *program;
+16 -8
View File
@@ -46,17 +46,22 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
${NS_INCLUDES} ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \
${DBDRIVER_INCLUDES} @OPENSSL_INCLUDES@
${DBDRIVER_INCLUDES} \
${OPENSSL_CFLAGS} \
${JSON_C_CFLAGS} \
${LIBXML2_CFLAGS} \
${MAXMINDDB_CFLAGS} \
${ZLIB_CFLAGS}
CDEFINES = @CONTRIB_DLZ@
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@
@@ -84,10 +89,11 @@ SUBDIRS = unix
TARGETS = named@EXEEXT@
GEOIPLINKOBJS = geoip.@O@
GEOIP2LINKOBJS = geoip.@O@
OBJS = builtin.@O@ config.@O@ control.@O@ \
controlconf.@O@ fuzz.@O@ @GEOIPLINKOBJS@ \
controlconf.@O@ fuzz.@O@ \
@GEOIP2LINKOBJS@ \
log.@O@ logconf.@O@ main.@O@ \
server.@O@ statschannel.@O@ \
tkeyconf.@O@ tsigconf.@O@ zoneconf.@O@ \
@@ -97,10 +103,11 @@ UOBJS = unix/os.@O@ unix/dlz_dlopen_driver.@O@
SYMOBJS = symtbl.@O@
GEOIPLINKSRCS = geoip.c
GEOIP2LINKSRCS = geoip.c
SRCS = builtin.c config.c control.c \
controlconf.c fuzz.c @GEOIPLINKSRCS@ \
controlconf.c fuzz.c \
@GEOIP2LINKSRCS@ \
log.c logconf.c main.c \
server.c statschannel.c \
tkeyconf.c tsigconf.c zoneconf.c \
@@ -132,6 +139,7 @@ config.@O@: config.c
-DDYNDB_LIBDIR=\"@libdir@/bind\" \
-DNAMED_LOCALSTATEDIR=\"${localstatedir}\" \
-DNAMED_SYSCONFDIR=\"${sysconfdir}\" \
-DMAXMINDDB_PREFIX=\"@MAXMINDDB_PREFIX@\" \
-c ${srcdir}/config.c
server.@O@: server.c
+81 -40
View File
@@ -15,6 +15,23 @@
<xsl:template match="statistics[@version=&quot;3.11&quot;]">
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
$(function($) {
var wid=0;
$('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; });
$('table.zones').css('min-width', wid );
$("h2+table,h3+table,h4+table,h2+div,h3+div,h2+script,h3+script").prev().append(' <a class="tabletoggle" href="#" style="font-size:small">Show/Hide</a>');
$(".tabletoggle").click(function(){
var n = $(this).closest("h2,h3,h4").next();
if (n.is("script")) { n = n.next(); }
if (n.is("div")) { n.toggleClass("hidden"); n = n.next(); }
if (n.is("table")) { n.toggleClass("hidden"); }
return false;
});
});
</script>
<xsl:if test="system-property('xsl:vendor')!='Transformiix'">
<!-- Non Mozilla specific markup -->
<script type="text/javascript" src="https://www.google.com/jsapi"/>
@@ -81,6 +98,10 @@
font-size: 10pt;
}
.hidden{
display: none;
}
.odd{
background-color: #f0f0f0;
}
@@ -221,6 +242,22 @@
background-color: rgb(1,169,206);
color: #ffffff;
}
table.zones {
border: 1px solid grey;
}
table.zones td {
text-align: right;
font-family: monospace;
}
table.zones td:nth-child(2) {
text-align: center;
}
table.zones td:nth-child(3) {
text-align: left;
}
table.zones tr:hover{
background-color: #99ddff;
}
td, th {
padding-right: 5px;
@@ -293,25 +330,25 @@
<hr/>
<h2>Server Status</h2>
<table class="info">
<tr>
<tr class="odd">
<th>Boot time:</th>
<td>
<xsl:value-of select="server/boot-time"/>
</td>
</tr>
<tr>
<tr class="even">
<th>Last reconfigured:</th>
<td>
<xsl:value-of select="server/config-time"/>
</td>
</tr>
<tr>
<tr class="odd">
<th>Current time:</th>
<td>
<xsl:value-of select="server/current-time"/>
</td>
</tr>
<tr>
<tr class="even">
<th>Server version:</th>
<td>
<xsl:value-of select="server/version"/>
@@ -330,7 +367,13 @@
<table class="counters">
<xsl:for-each select="server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']">
<xsl:sort select="." data-type="number" order="descending"/>
<tr>
<xsl:variable name="css-class0">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
<xsl:otherwise>odd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$css-class0}">
<th>
<xsl:value-of select="@name"/>
</th>
@@ -611,13 +654,13 @@
<br/>
</xsl:if>
</xsl:for-each>
<xsl:if test="traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<h2>Traffic Size Statistics</h2>
</xsl:if>
<xsl:if test="traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<h4>UDP Requests Received</h4>
<table class="counters">
<xsl:for-each select="traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -625,6 +668,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -636,10 +680,10 @@
</table>
<br/>
</xsl:if>
<xsl:if test="traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<h4>UDP Responses Sent</h4>
<table class="counters">
<xsl:for-each select="traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -647,6 +691,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -658,10 +703,10 @@
</table>
<br/>
</xsl:if>
<xsl:if test="traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<h4>TCP Requests Received</h4>
<table class="counters">
<xsl:for-each select="traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -669,6 +714,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -680,10 +726,10 @@
</table>
<br/>
</xsl:if>
<xsl:if test="traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:if test="traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<h4>TCP Responses Sent</h4>
<table class="counters">
<xsl:for-each select="traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:for-each select="traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]">
<xsl:variable name="css-class7">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
@@ -691,6 +737,7 @@
</xsl:choose>
</xsl:variable>
<tr class="{$css-class7}">
<th><xsl:value-of select="local-name(../../..)"/></th>
<th>
<xsl:value-of select="@name"/>
</th>
@@ -724,35 +771,29 @@
</table>
<br/>
</xsl:if>
<xsl:for-each select="views/view">
<xsl:if test="zones/zone">
<xsl:if test="views/view/zones/zone">
<xsl:for-each select="views/view">
<h3>Zones for View <xsl:value-of select="@name"/></h3>
<table class="zones">
<tr>
<th>Name</th>
<th>Class</th>
<th>Type</th>
<th>Serial</th>
</tr>
<xsl:for-each select="zones/zone">
<tr>
<td>
<xsl:value-of select="@name"/>
</td>
<td>
<xsl:value-of select="@rdataclass"/>
</td>
<td>
<xsl:value-of select="type"/>
</td>
<td>
<xsl:value-of select="serial"/>
</td>
</tr>
</xsl:for-each>
<thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>
<tbody>
<xsl:for-each select="zones/zone">
<xsl:variable name="css-class15">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
<xsl:otherwise>odd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$css-class15}">
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@rdataclass"/></td>
<td><xsl:value-of select="type"/></td>
<td><xsl:value-of select="serial"/></td></tr>
</xsl:for-each>
</tbody>
</table>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:if>
<xsl:if test="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
<h2>Received QTYPES per view/zone</h2>
<xsl:for-each select="views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]">
+77 -36
View File
@@ -20,6 +20,23 @@ static char xslmsg[] =
" <xsl:template match=\"statistics[@version=&quot;3.11&quot;]\">\n"
" <html>\n"
" <head>\n"
" <script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js\"></script>\n"
" <script type=\"text/javascript\">\n"
" $(function($) {\n"
" var wid=0;\n"
" $('table.zones').each(function(i) { if( $(this).width() > wid ) wid = $(this).width(); return true; });\n"
" $('table.zones').css('min-width', wid );\n"
" $(\"h2+table,h3+table,h4+table,h2+div,h3+div,h2+script,h3+script\").prev().append(' <a class=\"tabletoggle\" href=\"#\" style=\"font-size:small\">Show/Hide</a>');\n"
" $(\".tabletoggle\").click(function(){\n"
" var n = $(this).closest(\"h2,h3,h4\").next();\n"
" if (n.is(\"script\")) { n = n.next(); }\n"
" if (n.is(\"div\")) { n.toggleClass(\"hidden\"); n = n.next(); }\n"
" if (n.is(\"table\")) { n.toggleClass(\"hidden\"); }\n"
" return false;\n"
" });\n"
" });\n"
" </script>\n"
"\n"
" <xsl:if test=\"system-property('xsl:vendor')!='Transformiix'\">\n"
" <!-- Non Mozilla specific markup -->\n"
" <script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"/>\n"
@@ -86,6 +103,10 @@ static char xslmsg[] =
" font-size: 10pt;\n"
" }\n"
"\n"
" .hidden{\n"
" display: none;\n"
" }\n"
"\n"
" .odd{\n"
" background-color: #f0f0f0;\n"
" }\n"
@@ -226,6 +247,22 @@ static char xslmsg[] =
" background-color: rgb(1,169,206);\n"
" color: #ffffff;\n"
" }\n"
" table.zones {\n"
" border: 1px solid grey;\n"
" }\n"
" table.zones td {\n"
" text-align: right;\n"
" font-family: monospace;\n"
" }\n"
" table.zones td:nth-child(2) {\n"
" text-align: center;\n"
" }\n"
" table.zones td:nth-child(3) {\n"
" text-align: left;\n"
" }\n"
" table.zones tr:hover{\n"
" background-color: #99ddff;\n"
" }\n"
"\n"
" td, th {\n"
" padding-right: 5px;\n"
@@ -298,25 +335,25 @@ static char xslmsg[] =
" <hr/>\n"
" <h2>Server Status</h2>\n"
" <table class=\"info\">\n"
" <tr>\n"
" <tr class=\"odd\">\n"
" <th>Boot time:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/boot-time\"/>\n"
" </td>\n"
" </tr>\n"
" <tr>\n"
" <tr class=\"even\">\n"
" <th>Last reconfigured:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/config-time\"/>\n"
" </td>\n"
" </tr>\n"
" <tr>\n"
" <tr class=\"odd\">\n"
" <th>Current time:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/current-time\"/>\n"
" </td>\n"
" </tr>\n"
" <tr>\n"
" <tr class=\"even\">\n"
" <th>Server version:</th>\n"
" <td>\n"
" <xsl:value-of select=\"server/version\"/>\n"
@@ -335,7 +372,13 @@ static char xslmsg[] =
" <table class=\"counters\">\n"
" <xsl:for-each select=\"server/counters[@type=&quot;opcode&quot;]/counter[. &gt; 0 or substring(@name,1,3) != 'RES']\">\n"
" <xsl:sort select=\".\" data-type=\"number\" order=\"descending\"/>\n"
" <tr>\n"
" <xsl:variable name=\"css-class0\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" <xsl:otherwise>odd</xsl:otherwise>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class0}\">\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -616,13 +659,13 @@ static char xslmsg[] =
" <br/>\n"
" </xsl:if>\n"
" </xsl:for-each>\n"
" <xsl:if test=\"traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0] or traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <h2>Traffic Size Statistics</h2>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <h4>UDP Requests Received</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//udp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -630,6 +673,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -641,10 +685,10 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <h4>UDP Responses Sent</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//udp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -652,6 +696,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -663,10 +708,10 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <h4>TCP Requests Received</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//tcp/counters[@type=&quot;request-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -674,6 +719,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -685,10 +731,10 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:if test=\"traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <h4>TCP Responses Sent</h4>\n"
" <table class=\"counters\">\n"
" <xsl:for-each select=\"traffic/tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:for-each select=\"traffic//tcp/counters[@type=&quot;response-size&quot;]/counter[.&gt;0]\">\n"
" <xsl:variable name=\"css-class7\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
@@ -696,6 +742,7 @@ static char xslmsg[] =
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class7}\">\n"
" <th><xsl:value-of select=\"local-name(../../..)\"/></th>\n"
" <th>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </th>\n"
@@ -729,35 +776,29 @@ static char xslmsg[] =
" </table>\n"
" <br/>\n"
" </xsl:if>\n"
" <xsl:if test=\"views/view/zones/zone\">\n"
" <xsl:for-each select=\"views/view\">\n"
" <xsl:if test=\"zones/zone\">\n"
" <h3>Zones for View <xsl:value-of select=\"@name\"/></h3>\n"
" <table class=\"zones\">\n"
" <tr>\n"
" <th>Name</th>\n"
" <th>Class</th>\n"
" <th>Type</th>\n"
" <th>Serial</th>\n"
" </tr>\n"
" <thead><tr><th>Name</th><th>Class</th><th>Type</th><th>Serial</th></tr></thead>\n"
" <tbody>\n"
" <xsl:for-each select=\"zones/zone\">\n"
" <tr>\n"
" <td>\n"
" <xsl:value-of select=\"@name\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"@rdataclass\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"type\"/>\n"
" </td>\n"
" <td>\n"
" <xsl:value-of select=\"serial\"/>\n"
" </td>\n"
" </tr>\n"
" <xsl:variable name=\"css-class15\">\n"
" <xsl:choose>\n"
" <xsl:when test=\"position() mod 2 = 0\">even</xsl:when>\n"
" <xsl:otherwise>odd</xsl:otherwise>\n"
" </xsl:choose>\n"
" </xsl:variable>\n"
" <tr class=\"{$css-class15}\">\n"
" <td><xsl:value-of select=\"@name\"/></td>\n"
" <td><xsl:value-of select=\"@rdataclass\"/></td>\n"
" <td><xsl:value-of select=\"type\"/></td>\n"
" <td><xsl:value-of select=\"serial\"/></td></tr>\n"
" </xsl:for-each>\n"
" </tbody>\n"
" </table>\n"
" </xsl:if>\n"
" </xsl:for-each>\n"
" </xsl:if>\n"
" <xsl:if test=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"
" <h2>Received QTYPES per view/zone</h2>\n"
" <xsl:for-each select=\"views/view[zones/zone/counters[@type=&quot;qtype&quot;]/counter &gt;0]\">\n"
+10 -34
View File
@@ -50,7 +50,7 @@ options {\n\
automatic-interface-scan yes;\n\
bindkeys-file \"" NAMED_SYSCONFDIR "/bind.keys\";\n\
# blackhole {none;};\n"
" cookie-algorithm aes;\n"
" cookie-algorithm siphash24;\n"
#ifndef WIN32
" coresize default;\n\
datasize default;\n"
@@ -64,6 +64,11 @@ options {\n\
#ifndef WIN32
" files unlimited;\n"
#endif
#if defined(HAVE_GEOIP2) && !defined(WIN32)
" geoip-directory \"" MAXMINDDB_PREFIX "/share/GeoIP2\";\n"
#elif defined(HAVE_GEOIP2)
" geoip-directory \".\";\n"
#endif
"\
# has-old-clients <obsolete>;\n\
heartbeat-interval 60;\n\
@@ -140,7 +145,6 @@ options {\n\
check-names response ignore;\n\
check-names slave warn;\n\
check-spf warn;\n\
cleaning-interval 0; /* now meaningless */\n\
clients-per-query 10;\n\
dnssec-accept-expired no;\n\
dnssec-validation " VALIDATION_DEFAULT "; \n"
@@ -151,11 +155,8 @@ options {\n\
# fetch-glue <obsolete>;\n\
fetch-quota-params 100 0.1 0.3 0.7;\n\
fetches-per-server 0;\n\
fetches-per-zone 0;\n"
#ifdef HAVE_GEOIP
" geoip-use-ecs yes;\n"
#endif
" glue-cache yes;\n\
fetches-per-zone 0;\n\
glue-cache yes;\n\
lame-ttl 600;\n"
#ifdef HAVE_LMDB
" lmdb-mapsize 32M;\n"
@@ -291,10 +292,10 @@ view \"_bind\" chaos {\n\
# \"dnssec-validation auto;\" is set and\n\
# sysconfdir/bind.keys doesn't exist).\n\
#\n\
# BEGIN MANAGED KEYS\n"
# BEGIN DNSSEC KEYS\n"
/* Imported from bind.keys.h: */
MANAGED_KEYS
DNSSEC_KEYS
"# END MANAGED KEYS\n\
\n\
@@ -511,16 +512,9 @@ named_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
}
dscps = isc_mem_get(mctx, count * sizeof(isc_dscp_t));
if (dscps == NULL)
return (ISC_R_NOMEMORY);
}
addrs = isc_mem_get(mctx, count * sizeof(isc_sockaddr_t));
if (addrs == NULL) {
if (dscps != NULL)
isc_mem_put(mctx, dscps, count * sizeof(isc_dscp_t));
return (ISC_R_NOMEMORY);
}
for (element = cfg_list_first(addrlist);
element != NULL;
@@ -696,8 +690,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
newsize = newlen * sizeof(*lists);
oldsize = listcount * sizeof(*lists);
tmp = isc_mem_get(mctx, newsize);
if (tmp == NULL)
goto cleanup;
if (listcount != 0) {
memmove(tmp, lists, oldsize);
isc_mem_put(mctx, lists, oldsize);
@@ -732,8 +724,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
newsize = newlen * sizeof(*stack);
oldsize = stackcount * sizeof(*stack);
tmp = isc_mem_get(mctx, newsize);
if (tmp == NULL)
goto cleanup;
if (stackcount != 0) {
memmove(tmp, stack, oldsize);
isc_mem_put(mctx, stack, oldsize);
@@ -760,8 +750,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
newsize = newlen * sizeof(isc_sockaddr_t);
oldsize = addrcount * sizeof(isc_sockaddr_t);
tmp = isc_mem_get(mctx, newsize);
if (tmp == NULL)
goto cleanup;
if (addrcount != 0) {
memmove(tmp, addrs, oldsize);
isc_mem_put(mctx, addrs, oldsize);
@@ -772,8 +760,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
newsize = newlen * sizeof(isc_dscp_t);
oldsize = dscpcount * sizeof(isc_dscp_t);
tmp = isc_mem_get(mctx, newsize);
if (tmp == NULL)
goto cleanup;
if (dscpcount != 0) {
memmove(tmp, dscps, oldsize);
isc_mem_put(mctx, dscps, oldsize);
@@ -784,8 +770,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
newsize = newlen * sizeof(dns_name_t *);
oldsize = keycount * sizeof(dns_name_t *);
tmp = isc_mem_get(mctx, newsize);
if (tmp == NULL)
goto cleanup;
if (keycount != 0) {
memmove(tmp, keys, oldsize);
isc_mem_put(mctx, keys, oldsize);
@@ -805,8 +789,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
if (!cfg_obj_isstring(key))
continue;
keys[i - 1] = isc_mem_get(mctx, sizeof(dns_name_t));
if (keys[i - 1] == NULL)
goto cleanup;
dns_name_init(keys[i - 1], NULL);
keystr = cfg_obj_asstring(key);
@@ -837,8 +819,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
oldsize = addrcount * sizeof(isc_sockaddr_t);
if (i != 0) {
tmp = isc_mem_get(mctx, newsize);
if (tmp == NULL)
goto cleanup;
memmove(tmp, addrs, newsize);
} else
tmp = NULL;
@@ -850,8 +830,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
oldsize = dscpcount * sizeof(isc_dscp_t);
if (i != 0) {
tmp = isc_mem_get(mctx, newsize);
if (tmp == NULL)
goto cleanup;
memmove(tmp, dscps, newsize);
} else
tmp = NULL;
@@ -863,8 +841,6 @@ named_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
oldsize = keycount * sizeof(dns_name_t *);
if (i != 0) {
tmp = isc_mem_get(mctx, newsize);
if (tmp == NULL)
goto cleanup;
memmove(tmp, keys, newsize);
} else
tmp = NULL;
+14 -53
View File
@@ -369,9 +369,8 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
ccregion.rstart = isc_buffer_base(&conn->ccmsg.buffer);
ccregion.rend = isc_buffer_used(&conn->ccmsg.buffer);
secret.rstart = isc_mem_get(listener->mctx, key->secret.length);
if (secret.rstart == NULL)
goto cleanup;
secret.rstart = isc_mem_get(listener->mctx,
key->secret.length);
memmove(secret.rstart, key->secret.base, key->secret.length);
secret.rend = secret.rstart + key->secret.length;
algorithm = key->algorithm;
@@ -561,8 +560,6 @@ newconnection(controllistener_t *listener, isc_socket_t *sock) {
isc_result_t result;
conn = isc_mem_get(listener->mctx, sizeof(*conn));
if (conn == NULL)
return (ISC_R_NOMEMORY);
conn->sock = sock;
isccc_ccmsg_init(listener->mctx, sock, &conn->ccmsg);
@@ -709,7 +706,7 @@ cfgkeylist_find(const cfg_obj_t *keylist, const char *keyname,
return (ISC_R_SUCCESS);
}
static isc_result_t
static void
controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
controlkeylist_t *keyids)
{
@@ -726,11 +723,7 @@ controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
obj = cfg_listelt_value(element);
str = cfg_obj_asstring(obj);
newstr = isc_mem_strdup(mctx, str);
if (newstr == NULL)
goto cleanup;
key = isc_mem_get(mctx, sizeof(*key));
if (key == NULL)
goto cleanup;
key->keyname = newstr;
key->algorithm = DST_ALG_UNKNOWN;
key->secret.base = NULL;
@@ -739,13 +732,6 @@ controlkeylist_fromcfg(const cfg_obj_t *keylist, isc_mem_t *mctx,
ISC_LIST_APPEND(*keyids, key, link);
newstr = NULL;
}
return (ISC_R_SUCCESS);
cleanup:
if (newstr != NULL)
isc_mem_free(mctx, newstr);
free_controlkeylist(keyids, mctx);
return (ISC_R_NOMEMORY);
}
static void
@@ -819,15 +805,6 @@ register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
keyid->secret.length = isc_buffer_usedlength(&b);
keyid->secret.base = isc_mem_get(mctx,
keyid->secret.length);
if (keyid->secret.base == NULL) {
cfg_obj_log(keydef, named_g_lctx,
ISC_LOG_WARNING,
"couldn't register key '%s': "
"out of memory", keyid->keyname);
ISC_LIST_UNLINK(*keyids, keyid, link);
free_controlkey(keyid, mctx);
break;
}
memmove(keyid->secret.base, isc_buffer_base(&b),
keyid->secret.length);
}
@@ -868,8 +845,6 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
CHECK(cfg_map_get(config, "key", &key));
keyid = isc_mem_get(mctx, sizeof(*keyid));
if (keyid == NULL)
CHECK(ISC_R_NOMEMORY);
keyid->keyname = isc_mem_strdup(mctx,
cfg_obj_asstring(cfg_map_getname(key)));
keyid->secret.base = NULL;
@@ -911,14 +886,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
}
keyid->secret.length = isc_buffer_usedlength(&b);
keyid->secret.base = isc_mem_get(mctx,
keyid->secret.length);
if (keyid->secret.base == NULL) {
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
"couldn't register key '%s': "
"out of memory", keyid->keyname);
CHECK(ISC_R_NOMEMORY);
}
keyid->secret.base = isc_mem_get(mctx, keyid->secret.length);
memmove(keyid->secret.base, isc_buffer_base(&b),
keyid->secret.length);
ISC_LIST_APPEND(*keyids, keyid, link);
@@ -1017,14 +985,11 @@ update_listener(named_controls_t *cp, controllistener_t **listenerp,
INSIST(global_keylist != NULL);
ISC_LIST_INIT(keys);
result = controlkeylist_fromcfg(control_keylist,
listener->mctx, &keys);
if (result == ISC_R_SUCCESS) {
free_controlkeylist(&listener->keys, listener->mctx);
listener->keys = keys;
register_keys(control, global_keylist, &listener->keys,
listener->mctx, socktext);
}
controlkeylist_fromcfg(control_keylist, listener->mctx, &keys);
free_controlkeylist(&listener->keys, listener->mctx);
listener->keys = keys;
register_keys(control, global_keylist, &listener->keys,
listener->mctx, socktext);
} else {
free_controlkeylist(&listener->keys, listener->mctx);
result = get_rndckey(listener->mctx, &listener->keys);
@@ -1125,8 +1090,6 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
isc_result_t result = ISC_R_SUCCESS;
listener = isc_mem_get(mctx, sizeof(*listener));
if (listener == NULL)
result = ISC_R_NOMEMORY;
if (result == ISC_R_SUCCESS) {
listener->mctx = NULL;
@@ -1177,15 +1140,13 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp,
&control_keylist);
if (control_keylist != NULL) {
result = controlkeylist_fromcfg(control_keylist,
listener->mctx,
controlkeylist_fromcfg(control_keylist, listener->mctx,
&listener->keys);
if (result == ISC_R_SUCCESS)
register_keys(control, global_keylist,
&listener->keys,
listener->mctx, socktext);
} else
register_keys(control, global_keylist, &listener->keys,
listener->mctx, socktext);
} else {
result = get_rndckey(mctx, &listener->keys);
}
if (result != ISC_R_SUCCESS && control != NULL)
cfg_obj_log(control, named_g_lctx, ISC_LOG_WARNING,
+1 -1
View File
@@ -17,7 +17,7 @@
#ifdef ENABLE_AFL
#include <named/globals.h>
#include <named/server.h>
#include <sys/errno.h>
#include <errno.h>
#include <isc/app.h>
#include <isc/condition.h>
+95 -96
View File
@@ -11,133 +11,132 @@
/*! \file */
#if defined(HAVE_GEOIP2)
#include <maxminddb.h>
#endif
#include <isc/print.h>
#include <isc/string.h>
#include <isc/util.h>
#include <dns/geoip.h>
#include <named/log.h>
#include <named/geoip.h>
#include <dns/geoip.h>
static dns_geoip_databases_t geoip_table;
#ifdef HAVE_GEOIP
static dns_geoip_databases_t geoip_table = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
#if defined(HAVE_GEOIP2)
static MMDB_s geoip_country, geoip_city, geoip_as, geoip_isp, geoip_domain;
static void
init_geoip_db(GeoIP **dbp, GeoIPDBTypes edition, GeoIPDBTypes fallback,
GeoIPOptions method, const char *name)
{
char *info;
GeoIP *db;
static MMDB_s *
open_geoip2(const char *dir, const char *dbfile, MMDB_s *mmdb) {
char pathbuf[PATH_MAX];
unsigned int n;
int ret;
REQUIRE(dbp != NULL);
db = *dbp;
if (db != NULL) {
GeoIP_delete(db);
db = *dbp = NULL;
n = snprintf(pathbuf, sizeof(pathbuf), "%s/%s", dir, dbfile);
if (n >= sizeof(pathbuf)) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"GeoIP2 database '%s/%s': path too long",
dir, dbfile);
return (NULL);
}
if (! GeoIP_db_avail(edition)) {
ret = MMDB_open(pathbuf, MMDB_MODE_MMAP, mmdb);
if (ret == MMDB_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"GeoIP %s (type %d) DB not available", name, edition);
goto fail;
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"opened GeoIP2 database '%s'", pathbuf);
return (mmdb);
}
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"initializing GeoIP %s (type %d) DB", name, edition);
db = GeoIP_open_type(edition, method);
if (db == NULL) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed to initialize GeoIP %s (type %d) DB%s",
name, edition, fallback == 0
? "geoip matches using this database will fail" : "");
goto fail;
}
info = GeoIP_database_info(db);
if (info != NULL) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"%s", info);
free(info);
}
*dbp = db;
return;
fail:
if (fallback != 0)
init_geoip_db(dbp, fallback, 0, method, name);
NAMED_LOGMODULE_SERVER, ISC_LOG_DEBUG(1),
"unable to open GeoIP2 database '%s' (status %d)",
pathbuf, ret);
return (NULL);
}
#endif /* HAVE_GEOIP */
#endif /* HAVE_GEOIP2 */
void
named_geoip_init(void) {
#ifndef HAVE_GEOIP
return;
#else
GeoIP_cleanup();
if (named_g_geoip == NULL)
#if defined(HAVE_GEOIP2)
if (named_g_geoip == NULL) {
named_g_geoip = &geoip_table;
}
#else
return;
#endif
}
void
named_geoip_load(char *dir) {
#ifndef HAVE_GEOIP
#if defined(HAVE_GEOIP2)
REQUIRE(dir != NULL);
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"looking for GeoIP2 databases in '%s'", dir);
named_g_geoip->country = open_geoip2(dir, "GeoIP2-Country.mmdb",
&geoip_country);
if (named_g_geoip->country == NULL) {
named_g_geoip->country = open_geoip2(dir,
"GeoLite2-Country.mmdb",
&geoip_country);
}
named_g_geoip->city = open_geoip2(dir, "GeoIP2-City.mmdb",
&geoip_city);
if (named_g_geoip->city == NULL) {
named_g_geoip->city = open_geoip2(dir, "GeoLite2-City.mmdb",
&geoip_city);
}
named_g_geoip->as = open_geoip2(dir, "GeoIP2-ASN.mmdb", &geoip_as);
if (named_g_geoip->as == NULL) {
named_g_geoip->as = open_geoip2(dir, "GeoLite2-ASN.mmdb",
&geoip_as);
}
named_g_geoip->isp = open_geoip2(dir, "GeoIP2-ISP.mmdb", &geoip_isp);
named_g_geoip->domain = open_geoip2(dir, "GeoIP2-Domain.mmdb",
&geoip_domain);
#else
UNUSED(dir);
return;
#else
GeoIPOptions method;
#ifdef _WIN32
method = GEOIP_STANDARD;
#else
method = GEOIP_MMAP_CACHE;
#endif
}
named_geoip_init();
if (dir != NULL) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"using \"%s\" as GeoIP directory", dir);
GeoIP_setup_custom_directory(dir);
void
named_geoip_shutdown(void) {
#ifdef HAVE_GEOIP2
if (named_g_geoip->country != NULL) {
MMDB_close(named_g_geoip->country);
named_g_geoip->country = NULL;
}
init_geoip_db(&named_g_geoip->country_v4, GEOIP_COUNTRY_EDITION, 0,
method, "Country (IPv4)");
#ifdef HAVE_GEOIP_V6
init_geoip_db(&named_g_geoip->country_v6, GEOIP_COUNTRY_EDITION_V6, 0,
method, "Country (IPv6)");
#endif
init_geoip_db(&named_g_geoip->city_v4, GEOIP_CITY_EDITION_REV1,
GEOIP_CITY_EDITION_REV0, method, "City (IPv4)");
#if defined(HAVE_GEOIP_V6) && defined(HAVE_GEOIP_CITY_V6)
init_geoip_db(&named_g_geoip->city_v6, GEOIP_CITY_EDITION_REV1_V6,
GEOIP_CITY_EDITION_REV0_V6, method, "City (IPv6)");
#endif
init_geoip_db(&named_g_geoip->region, GEOIP_REGION_EDITION_REV1,
GEOIP_REGION_EDITION_REV0, method, "Region");
if (named_g_geoip->city != NULL) {
MMDB_close(named_g_geoip->city);
named_g_geoip->city = NULL;
}
if (named_g_geoip->as != NULL) {
MMDB_close(named_g_geoip->as);
named_g_geoip->as = NULL;
}
if (named_g_geoip->isp != NULL) {
MMDB_close(named_g_geoip->isp);
named_g_geoip->isp = NULL;
}
if (named_g_geoip->domain != NULL) {
MMDB_close(named_g_geoip->domain);
named_g_geoip->domain = NULL;
}
#endif /* HAVE_GEOIP2 */
init_geoip_db(&named_g_geoip->isp, GEOIP_ISP_EDITION, 0,
method, "ISP");
init_geoip_db(&named_g_geoip->org, GEOIP_ORG_EDITION, 0,
method, "Org");
init_geoip_db(&named_g_geoip->as, GEOIP_ASNUM_EDITION, 0,
method, "AS");
init_geoip_db(&named_g_geoip->domain, GEOIP_DOMAIN_EDITION, 0,
method, "Domain");
init_geoip_db(&named_g_geoip->netspeed, GEOIP_NETSPEED_EDITION, 0,
method, "NetSpeed");
#endif /* HAVE_GEOIP */
dns_geoip_shutdown();
}
+10 -13
View File
@@ -9,18 +9,15 @@
* information regarding copyright ownership.
*/
#ifndef _GEOIP_H
#define _GEOIP_H
#pragma once
#ifdef HAVE_GEOIP
#include <GeoIP.h>
#include <GeoIPCity.h>
#endif /* HAVE_GEOIP */
void named_geoip_init(void);
void named_geoip_load(char *dir);
#ifdef HAVE_GEOIP
extern dns_geoip_databases_t *named_g_geoip;
#endif /* HAVE_GEOIP */
#endif
void
named_geoip_init(void);
void
named_geoip_load(char *dir);
void
named_geoip_shutdown(void);
+1 -1
View File
@@ -154,7 +154,7 @@ EXTERN bool named_g_keepstderr INIT(false);
EXTERN unsigned int named_g_tat_interval INIT(24*3600);
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP2)
EXTERN dns_geoip_databases_t *named_g_geoip INIT(NULL);
#endif
+5 -6
View File
@@ -22,7 +22,6 @@
#include <isc/quota.h>
#include <isc/sockaddr.h>
#include <isc/types.h>
#include <isc/xml.h>
#include <dns/acl.h>
#include <dns/dnstap.h>
@@ -56,9 +55,9 @@ struct named_server {
char * secrootsfile; /*%< Secroots file name */
char * bindkeysfile; /*%< bind.keys file name */
char * recfile; /*%< Recursive file name */
bool version_set; /*%< User has set version */
bool version_set; /*%< User has set version */
char * version; /*%< User-specified version */
bool hostname_set; /*%< User has set hostname */
bool hostname_set; /*%< User has set hostname */
char * hostname; /*%< User-specified hostname */
/* Server data structures. */
@@ -78,9 +77,9 @@ struct named_server {
isc_mutex_t reload_event_lock;
isc_event_t * reload_event;
bool reload_in_progress;
named_reload_t reload_status;
bool flushonshutdown;
bool flushonshutdown;
named_cachelist_t cachelist; /*%< Possibly shared caches */
isc_stats_t * zonestats; /*% Zone management stats */
@@ -98,7 +97,7 @@ struct named_server {
dns_name_t *session_keyname;
unsigned int session_keyalg;
uint16_t session_keybits;
bool interface_auto;
bool interface_auto;
unsigned char secret[32]; /*%< Server Cookie Secret */
ns_cookiealg_t cookiealg;
+9
View File
@@ -27,4 +27,13 @@ typedef ISC_LIST(named_dispatch_t) named_dispatchlist_t;
typedef struct named_statschannel named_statschannel_t;
typedef ISC_LIST(named_statschannel_t) named_statschannellist_t;
/*%
* Used for server->reload_status as printed by `rndc status`
*/
typedef enum {
NAMED_RELOAD_DONE,
NAMED_RELOAD_IN_PROGRESS,
NAMED_RELOAD_FAILED,
} named_reload_t;
#endif /* NAMED_TYPES_H */
+11 -7
View File
@@ -54,6 +54,9 @@
#include <gperftools/profiler.h>
#endif
#ifdef HAVE_JSON_C
#include <json_c_version.h>
#endif /* HAVE_JSON_C */
/*
* Defining NAMED_MAIN provides storage declarations (rather than extern)
@@ -79,6 +82,7 @@
#include <openssl/crypto.h>
#ifdef HAVE_LIBXML2
#include <libxml/xmlversion.h>
#include <libxml/parser.h>
#endif
#ifdef HAVE_ZLIB
#include <zlib.h>
@@ -338,7 +342,7 @@ save_command_line(int argc, char *argv[]) {
int i;
char *dst = saved_command_line;
char *eob = saved_command_line + sizeof(saved_command_line) - 1;
char *rollback;
char *rollback = dst;
for (i = 1; i < argc && dst < eob; i++) {
char *src = argv[i];
@@ -526,10 +530,10 @@ OPENSSL_VERSION_NUMBER >= 0x10100000L /* 1.1.0 or higher */
printf("linked to libxml2 version: %s\n",
xmlParserVersion);
#endif
#if defined(HAVE_JSON) && defined(JSON_C_VERSION)
printf("compiled with libjson-c version: %s\n",
#if defined(HAVE_JSON_C)
printf("compiled with json-c version: %s\n",
JSON_C_VERSION);
printf("linked to libjson-c version: %s\n",
printf("linked to json-c version: %s\n",
json_c_version());
#endif
#if defined(HAVE_ZLIB) && defined(ZLIB_VERSION)
@@ -1092,13 +1096,13 @@ setup(void) {
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"linked to libxml2 version: %s", xmlParserVersion);
#endif
#if defined(HAVE_JSON) && defined(JSON_C_VERSION)
#if defined(HAVE_JSON_C)
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"compiled with libjson-c version: %s", JSON_C_VERSION);
"compiled with json-c version: %s", JSON_C_VERSION);
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_MAIN, ISC_LOG_NOTICE,
"linked to libjson-c version: %s", json_c_version());
"linked to json-c version: %s", json_c_version());
#endif
#if defined(HAVE_ZLIB) && defined(ZLIB_VERSION)
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
+51 -33
View File
@@ -10,12 +10,12 @@
.\" Title: named.conf
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2018-12-07
.\" Date: 2019-08-07
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "NAMED\&.CONF" "5" "2018\-12\-07" "ISC" "BIND9"
.TH "NAMED\&.CONF" "5" "2019\-08\-07" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -97,6 +97,19 @@ dlz \fIstring\fR {
.if n \{\
.RE
.\}
.SH "DNSSEC-KEYS"
.sp
.if n \{\
.RS 4
.\}
.nf
dnssec\-keys { \fIstring\fR ( static\-key |
initial\-key ) \fIinteger\fR \fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. };
.fi
.if n \{\
.RE
.\}
.SH "DYNDB"
.sp
.if n \{\
@@ -149,13 +162,17 @@ logging {
.RE
.\}
.SH "MANAGED-KEYS"
.PP
Deprecated \- see DNSSEC\-KEYS\&.
.sp
.if n \{\
.RS 4
.\}
.nf
managed\-keys { \fIstring\fR \fIstring\fR \fIinteger\fR
\fIinteger\fR \fIinteger\fR \fIquoted_string\fR; \&.\&.\&. };
managed\-keys { \fIstring\fR ( static\-key
| initial\-key ) \fIinteger\fR
\fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. }; deprecated
.fi
.if n \{\
.RE
@@ -225,9 +242,8 @@ options {
check\-spf ( warn | ignore );
check\-srv\-cname ( fail | warn | ignore );
check\-wildcard \fIboolean\fR;
cleaning\-interval \fIinteger\fR;
clients\-per\-query \fIinteger\fR;
cookie\-algorithm ( aes | sha1 | sha256 );
cookie\-algorithm ( aes | siphash24 );
cookie\-secret \fIstring\fR;
coresize ( default | unlimited | \fIsizeval\fR );
datasize ( default | unlimited | \fIsizeval\fR );
@@ -257,10 +273,7 @@ options {
dnsrps\-options { \fIunspecified\-text\fR };
dnssec\-accept\-expired \fIboolean\fR;
dnssec\-dnskey\-kskonly \fIboolean\fR;
dnssec\-enable \fIboolean\fR;
dnssec\-loadkeys\-interval \fIinteger\fR;
dnssec\-lookaside ( \fIstring\fR trust\-anchor
\fIstring\fR | auto | no );
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign );
@@ -409,11 +422,12 @@ options {
resolver\-retry\-interval \fIinteger\fR;
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
\fIinteger\fR;
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
\fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ policy ( cname |
disabled | drop | given | no\-op | nodata | nxdomain | passthru
| tcp\-only \fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ] [
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [
response\-policy { zone \fIstring\fR [ add\-soa \fIboolean\fR ] [ log
\fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval
\fIttlval\fR ] [ policy ( cname | disabled | drop | given | no\-op |
nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ add\-soa \fIboolean\fR ] [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [
min\-update\-interval \fIttlval\fR ] [ min\-ns\-dots \fIinteger\fR ] [
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
@@ -551,13 +565,16 @@ statistics\-channels {
.RE
.\}
.SH "TRUSTED-KEYS"
.PP
Deprecated \- see DNSSEC\-KEYS\&.
.sp
.if n \{\
.RS 4
.\}
.nf
trusted\-keys { \fIstring\fR \fIinteger\fR \fIinteger\fR
\fIinteger\fR \fIquoted_string\fR; \&.\&.\&. };
trusted\-keys { \fIstring\fR \fIinteger\fR
\fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. }; deprecated
.fi
.if n \{\
.RE
@@ -607,7 +624,6 @@ view \fIstring\fR [ \fIclass\fR ] {
check\-spf ( warn | ignore );
check\-srv\-cname ( fail | warn | ignore );
check\-wildcard \fIboolean\fR;
cleaning\-interval \fIinteger\fR;
clients\-per\-query \fIinteger\fR;
deny\-answer\-addresses { \fIaddress_match_element\fR; \&.\&.\&. } [
except\-from { \fIstring\fR; \&.\&.\&. } ];
@@ -638,10 +654,10 @@ view \fIstring\fR [ \fIclass\fR ] {
dnsrps\-options { \fIunspecified\-text\fR };
dnssec\-accept\-expired \fIboolean\fR;
dnssec\-dnskey\-kskonly \fIboolean\fR;
dnssec\-enable \fIboolean\fR;
dnssec\-keys { \fIstring\fR ( static\-key |
initial\-key ) \fIinteger\fR \fIinteger\fR
\fIinteger\fR \fIquoted_string\fR; \&.\&.\&. };
dnssec\-loadkeys\-interval \fIinteger\fR;
dnssec\-lookaside ( \fIstring\fR trust\-anchor
\fIstring\fR | auto | no );
dnssec\-must\-be\-secure \fIstring\fR \fIboolean\fR;
dnssec\-secure\-to\-insecure \fIboolean\fR;
dnssec\-update\-mode ( maintain | no\-resign );
@@ -676,9 +692,11 @@ view \fIstring\fR [ \fIclass\fR ] {
key\-directory \fIquoted_string\fR;
lame\-ttl \fIttlval\fR;
lmdb\-mapsize \fIsizeval\fR;
managed\-keys { \fIstring\fR \fIstring\fR
\fIinteger\fR \fIinteger\fR \fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. };
managed\-keys { \fIstring\fR (
static\-key | initial\-key
) \fIinteger\fR \fIinteger\fR
\fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. }; deprecated
masterfile\-format ( map | raw | text );
masterfile\-style ( full | relative );
match\-clients { \fIaddress_match_element\fR; \&.\&.\&. };
@@ -761,11 +779,12 @@ view \fIstring\fR [ \fIclass\fR ] {
resolver\-retry\-interval \fIinteger\fR;
response\-padding { \fIaddress_match_element\fR; \&.\&.\&. } block\-size
\fIinteger\fR;
response\-policy { zone \fIstring\fR [ log \fIboolean\fR ] [ max\-policy\-ttl
\fIttlval\fR ] [ min\-update\-interval \fIttlval\fR ] [ policy ( cname |
disabled | drop | given | no\-op | nodata | nxdomain | passthru
| tcp\-only \fIquoted_string\fR ) ] [ recursive\-only \fIboolean\fR ] [
nsip\-enable \fIboolean\fR ] [ nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [
response\-policy { zone \fIstring\fR [ add\-soa \fIboolean\fR ] [ log
\fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [ min\-update\-interval
\fIttlval\fR ] [ policy ( cname | disabled | drop | given | no\-op |
nodata | nxdomain | passthru | tcp\-only \fIquoted_string\fR ) ] [
recursive\-only \fIboolean\fR ] [ nsip\-enable \fIboolean\fR ] [
nsdname\-enable \fIboolean\fR ]; \&.\&.\&. } [ add\-soa \fIboolean\fR ] [
break\-dnssec \fIboolean\fR ] [ max\-policy\-ttl \fIttlval\fR ] [
min\-update\-interval \fIttlval\fR ] [ min\-ns\-dots \fIinteger\fR ] [
nsip\-wait\-recurse \fIboolean\fR ] [ qname\-wait\-recurse \fIboolean\fR ]
@@ -827,9 +846,10 @@ view \fIstring\fR [ \fIclass\fR ] {
transfer\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR | * )
] [ dscp \fIinteger\fR ];
trust\-anchor\-telemetry \fIboolean\fR; // experimental
trusted\-keys { \fIstring\fR \fIinteger\fR
\fIinteger\fR \fIinteger\fR \fIquoted_string\fR;
\&.\&.\&. };
trusted\-keys { \fIstring\fR
\fIinteger\fR \fIinteger\fR
\fIinteger\fR
\fIquoted_string\fR; \&.\&.\&. }; deprecated
try\-tcp\-refresh \fIboolean\fR;
update\-check\-ksk \fIboolean\fR;
use\-alt\-transfer\-source \fIboolean\fR;
@@ -887,7 +907,6 @@ view \fIstring\fR [ \fIclass\fR ] {
masters [ port \fIinteger\fR ] [ dscp \fIinteger\fR ] { ( \fImasters\fR
| \fIipv4_address\fR [ port \fIinteger\fR ] | \fIipv6_address\fR [
port \fIinteger\fR ] ) [ key \fIstring\fR ]; \&.\&.\&. };
max\-ixfr\-log\-size ( default | unlimited |
max\-journal\-size ( default | unlimited | \fIsizeval\fR );
max\-records \fIinteger\fR;
max\-refresh\-time \fIinteger\fR;
@@ -907,7 +926,6 @@ view \fIstring\fR [ \fIclass\fR ] {
notify\-source\-v6 ( \fIipv6_address\fR | * ) [ port ( \fIinteger\fR
| * ) ] [ dscp \fIinteger\fR ];
notify\-to\-soa \fIboolean\fR;
pubkey \fIinteger\fR \fIinteger\fR \fIinteger\fR
request\-expire \fIboolean\fR;
request\-ixfr \fIboolean\fR;
serial\-update\-method ( date | increment | unixtime );
+43 -48
View File
@@ -13,7 +13,7 @@
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named.conf">
<info>
<date>2018-12-07</date>
<date>2019-08-07</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
@@ -80,14 +80,12 @@
</refsection>
<refsection><info><title>ACL</title></info>
<literallayout class="normal">
acl <replaceable>string</replaceable> { <replaceable>address_match_element</replaceable>; ... };
</literallayout>
</refsection>
<refsection><info><title>CONTROLS</title></info>
<literallayout class="normal">
controls {
inet ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> |
@@ -104,7 +102,6 @@ controls {
</refsection>
<refsection><info><title>DLZ</title></info>
<literallayout class="normal">
dlz <replaceable>string</replaceable> {
database <replaceable>string</replaceable>;
@@ -113,8 +110,15 @@ dlz <replaceable>string</replaceable> {
</literallayout>
</refsection>
<refsection><info><title>DYNDB</title></info>
<refsection><info><title>DNSSEC-KEYS</title></info>
<literallayout class="normal">
dnssec-keys { <replaceable>string</replaceable> ( static-key |
initial-key ) <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... };
</literallayout>
</refsection>
<refsection><info><title>DYNDB</title></info>
<literallayout class="normal">
dyndb <replaceable>string</replaceable> <replaceable>quoted_string</replaceable> {
<replaceable>unspecified-text</replaceable> };
@@ -122,7 +126,6 @@ dyndb <replaceable>string</replaceable> <replaceable>quoted_string</replaceable>
</refsection>
<refsection><info><title>KEY</title></info>
<literallayout class="normal">
key <replaceable>string</replaceable> {
algorithm <replaceable>string</replaceable>;
@@ -132,7 +135,6 @@ key <replaceable>string</replaceable> {
</refsection>
<refsection><info><title>LOGGING</title></info>
<literallayout class="normal">
logging {
category <replaceable>string</replaceable> { <replaceable>string</replaceable>; ... };
@@ -152,17 +154,17 @@ logging {
</literallayout>
</refsection>
<refsection><info><title>MANAGED-KEYS</title></info>
<para>Deprecated - see DNSSEC-KEYS.</para>
<literallayout class="normal">
managed-keys { <replaceable>string</replaceable> <replaceable>string</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; ... };
managed-keys { <replaceable>string</replaceable> ( static-key
| initial-key ) <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... }; deprecated
</literallayout>
</refsection>
<refsection><info><title>MASTERS</title></info>
<literallayout class="normal">
masters <replaceable>string</replaceable> [ port <replaceable>integer</replaceable> ] [ dscp
<replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable> | <replaceable>ipv4_address</replaceable> [
@@ -172,7 +174,6 @@ masters <replaceable>string</replaceable> [ port <replaceable>integer</replaceab
</refsection>
<refsection><info><title>OPTIONS</title></info>
<literallayout class="normal">
options {
allow-new-zones <replaceable>boolean</replaceable>;
@@ -219,9 +220,8 @@ options {
check-spf ( warn | ignore );
check-srv-cname ( fail | warn | ignore );
check-wildcard <replaceable>boolean</replaceable>;
cleaning-interval <replaceable>integer</replaceable>;
clients-per-query <replaceable>integer</replaceable>;
cookie-algorithm ( aes | sha1 | sha256 );
cookie-algorithm ( aes | siphash24 );
cookie-secret <replaceable>string</replaceable>;
coresize ( default | unlimited | <replaceable>sizeval</replaceable> );
datasize ( default | unlimited | <replaceable>sizeval</replaceable> );
@@ -251,10 +251,7 @@ options {
dnsrps-options { <replaceable>unspecified-text</replaceable> };
dnssec-accept-expired <replaceable>boolean</replaceable>;
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
dnssec-enable <replaceable>boolean</replaceable>;
dnssec-loadkeys-interval <replaceable>integer</replaceable>;
dnssec-lookaside ( <replaceable>string</replaceable> trust-anchor
<replaceable>string</replaceable> | auto | no );
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
dnssec-update-mode ( maintain | no-resign );
@@ -403,11 +400,12 @@ options {
resolver-retry-interval <replaceable>integer</replaceable>;
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
<replaceable>integer</replaceable>;
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
<replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ policy ( cname |
disabled | drop | given | no-op | nodata | nxdomain | passthru
| tcp-only <replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ] [
nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ]; ... } [
response-policy { zone <replaceable>string</replaceable> [ add-soa <replaceable>boolean</replaceable> ] [ log
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval
<replaceable>ttlval</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ add-soa <replaceable>boolean</replaceable> ] [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [
min-update-interval <replaceable>ttlval</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
@@ -474,7 +472,6 @@ options {
</refsection>
<refsection><info><title>PLUGIN</title></info>
<literallayout class="normal">
plugin ( query ) <replaceable>string</replaceable> [ { <replaceable>unspecified-text</replaceable>
} ];
@@ -482,7 +479,6 @@ plugin ( query ) <replaceable>string</replaceable> [ { <replaceable>unspecified-
</refsection>
<refsection><info><title>SERVER</title></info>
<literallayout class="normal">
server <replaceable>netprefix</replaceable> {
bogus <replaceable>boolean</replaceable>;
@@ -520,7 +516,6 @@ server <replaceable>netprefix</replaceable> {
</refsection>
<refsection><info><title>STATISTICS-CHANNELS</title></info>
<literallayout class="normal">
statistics-channels {
inet ( <replaceable>ipv4_address</replaceable> | <replaceable>ipv6_address</replaceable> |
@@ -532,15 +527,15 @@ statistics-channels {
</refsection>
<refsection><info><title>TRUSTED-KEYS</title></info>
<para>Deprecated - see DNSSEC-KEYS.</para>
<literallayout class="normal">
trusted-keys { <replaceable>string</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; ... };
trusted-keys { <replaceable>string</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... }; deprecated
</literallayout>
</refsection>
<refsection><info><title>VIEW</title></info>
<literallayout class="normal">
view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
allow-new-zones <replaceable>boolean</replaceable>;
@@ -581,7 +576,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
check-spf ( warn | ignore );
check-srv-cname ( fail | warn | ignore );
check-wildcard <replaceable>boolean</replaceable>;
cleaning-interval <replaceable>integer</replaceable>;
clients-per-query <replaceable>integer</replaceable>;
deny-answer-addresses { <replaceable>address_match_element</replaceable>; ... } [
except-from { <replaceable>string</replaceable>; ... } ];
@@ -612,10 +606,10 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
dnsrps-options { <replaceable>unspecified-text</replaceable> };
dnssec-accept-expired <replaceable>boolean</replaceable>;
dnssec-dnskey-kskonly <replaceable>boolean</replaceable>;
dnssec-enable <replaceable>boolean</replaceable>;
dnssec-keys { <replaceable>string</replaceable> ( static-key |
initial-key ) <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>; ... };
dnssec-loadkeys-interval <replaceable>integer</replaceable>;
dnssec-lookaside ( <replaceable>string</replaceable> trust-anchor
<replaceable>string</replaceable> | auto | no );
dnssec-must-be-secure <replaceable>string</replaceable> <replaceable>boolean</replaceable>;
dnssec-secure-to-insecure <replaceable>boolean</replaceable>;
dnssec-update-mode ( maintain | no-resign );
@@ -650,9 +644,11 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
key-directory <replaceable>quoted_string</replaceable>;
lame-ttl <replaceable>ttlval</replaceable>;
lmdb-mapsize <replaceable>sizeval</replaceable>;
managed-keys { <replaceable>string</replaceable> <replaceable>string</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... };
managed-keys { <replaceable>string</replaceable> (
static-key | initial-key
) <replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... }; deprecated
masterfile-format ( map | raw | text );
masterfile-style ( full | relative );
match-clients { <replaceable>address_match_element</replaceable>; ... };
@@ -735,11 +731,12 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
resolver-retry-interval <replaceable>integer</replaceable>;
response-padding { <replaceable>address_match_element</replaceable>; ... } block-size
<replaceable>integer</replaceable>;
response-policy { zone <replaceable>string</replaceable> [ log <replaceable>boolean</replaceable> ] [ max-policy-ttl
<replaceable>ttlval</replaceable> ] [ min-update-interval <replaceable>ttlval</replaceable> ] [ policy ( cname |
disabled | drop | given | no-op | nodata | nxdomain | passthru
| tcp-only <replaceable>quoted_string</replaceable> ) ] [ recursive-only <replaceable>boolean</replaceable> ] [
nsip-enable <replaceable>boolean</replaceable> ] [ nsdname-enable <replaceable>boolean</replaceable> ]; ... } [
response-policy { zone <replaceable>string</replaceable> [ add-soa <replaceable>boolean</replaceable> ] [ log
<replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [ min-update-interval
<replaceable>ttlval</replaceable> ] [ policy ( cname | disabled | drop | given | no-op |
nodata | nxdomain | passthru | tcp-only <replaceable>quoted_string</replaceable> ) ] [
recursive-only <replaceable>boolean</replaceable> ] [ nsip-enable <replaceable>boolean</replaceable> ] [
nsdname-enable <replaceable>boolean</replaceable> ]; ... } [ add-soa <replaceable>boolean</replaceable> ] [
break-dnssec <replaceable>boolean</replaceable> ] [ max-policy-ttl <replaceable>ttlval</replaceable> ] [
min-update-interval <replaceable>ttlval</replaceable> ] [ min-ns-dots <replaceable>integer</replaceable> ] [
nsip-wait-recurse <replaceable>boolean</replaceable> ] [ qname-wait-recurse <replaceable>boolean</replaceable> ]
@@ -801,9 +798,10 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
transfer-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable> | * )
] [ dscp <replaceable>integer</replaceable> ];
trust-anchor-telemetry <replaceable>boolean</replaceable>; // experimental
trusted-keys { <replaceable>string</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>quoted_string</replaceable>;
... };
trusted-keys { <replaceable>string</replaceable>
<replaceable>integer</replaceable> <replaceable>integer</replaceable>
<replaceable>integer</replaceable>
<replaceable>quoted_string</replaceable>; ... }; deprecated
try-tcp-refresh <replaceable>boolean</replaceable>;
update-check-ksk <replaceable>boolean</replaceable>;
use-alt-transfer-source <replaceable>boolean</replaceable>;
@@ -861,7 +859,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
masters [ port <replaceable>integer</replaceable> ] [ dscp <replaceable>integer</replaceable> ] { ( <replaceable>masters</replaceable>
| <replaceable>ipv4_address</replaceable> [ port <replaceable>integer</replaceable> ] | <replaceable>ipv6_address</replaceable> [
port <replaceable>integer</replaceable> ] ) [ key <replaceable>string</replaceable> ]; ... };
max-ixfr-log-size ( default | unlimited |
max-journal-size ( default | unlimited | <replaceable>sizeval</replaceable> );
max-records <replaceable>integer</replaceable>;
max-refresh-time <replaceable>integer</replaceable>;
@@ -881,7 +878,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
notify-source-v6 ( <replaceable>ipv6_address</replaceable> | * ) [ port ( <replaceable>integer</replaceable>
| * ) ] [ dscp <replaceable>integer</replaceable> ];
notify-to-soa <replaceable>boolean</replaceable>;
pubkey <replaceable>integer</replaceable> <replaceable>integer</replaceable> <replaceable>integer</replaceable>
request-expire <replaceable>boolean</replaceable>;
request-ixfr <replaceable>boolean</replaceable>;
serial-update-method ( date | increment | unixtime );
@@ -915,7 +911,6 @@ view <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
</refsection>
<refsection><info><title>ZONE</title></info>
<literallayout class="normal">
zone <replaceable>string</replaceable> [ <replaceable>class</replaceable> ] {
allow-notify { <replaceable>address_match_element</replaceable>; ... };
+56 -60
View File
@@ -59,7 +59,6 @@
<div class="refsection">
<a name="id-1.8"></a><h2>ACL</h2>
<div class="literallayout"><p><br>
acl <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
</p></div>
@@ -67,7 +66,6 @@ acl
<div class="refsection">
<a name="id-1.9"></a><h2>CONTROLS</h2>
<div class="literallayout"><p><br>
controls {<br>
inet ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> |<br>
@@ -85,7 +83,6 @@ controls
<div class="refsection">
<a name="id-1.10"></a><h2>DLZ</h2>
<div class="literallayout"><p><br>
dlz <em class="replaceable"><code>string</code></em> {<br>
database <em class="replaceable"><code>string</code></em>;<br>
@@ -95,8 +92,16 @@ dlz
</div>
<div class="refsection">
<a name="id-1.11"></a><h2>DYNDB</h2>
<a name="id-1.11"></a><h2>DNSSEC-KEYS</h2>
<div class="literallayout"><p><br>
dnssec-keys { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
</p></div>
</div>
<div class="refsection">
<a name="id-1.12"></a><h2>DYNDB</h2>
<div class="literallayout"><p><br>
dyndb <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>quoted_string</code></em> {<br>
    <em class="replaceable"><code>unspecified-text</code></em> };<br>
@@ -104,8 +109,7 @@ dyndb
</div>
<div class="refsection">
<a name="id-1.12"></a><h2>KEY</h2>
<a name="id-1.13"></a><h2>KEY</h2>
<div class="literallayout"><p><br>
key <em class="replaceable"><code>string</code></em> {<br>
algorithm <em class="replaceable"><code>string</code></em>;<br>
@@ -115,8 +119,7 @@ key
</div>
<div class="refsection">
<a name="id-1.13"></a><h2>LOGGING</h2>
<a name="id-1.14"></a><h2>LOGGING</h2>
<div class="literallayout"><p><br>
logging {<br>
category <em class="replaceable"><code>string</code></em> { <em class="replaceable"><code>string</code></em>; ... };<br>
@@ -136,19 +139,19 @@ logging
</p></div>
</div>
<div class="refsection">
<a name="id-1.14"></a><h2>MANAGED-KEYS</h2>
<a name="id-1.15"></a><h2>MANAGED-KEYS</h2>
<p>Deprecated - see DNSSEC-KEYS.</p>
<div class="literallayout"><p><br>
managed-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
managed-keys { <em class="replaceable"><code>string</code></em> ( static-key<br>
    | initial-key ) <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
</p></div>
</div>
<div class="refsection">
<a name="id-1.15"></a><h2>MASTERS</h2>
<a name="id-1.16"></a><h2>MASTERS</h2>
<div class="literallayout"><p><br>
masters <em class="replaceable"><code>string</code></em> [ port <em class="replaceable"><code>integer</code></em> ] [ dscp<br>
    <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em> | <em class="replaceable"><code>ipv4_address</code></em> [<br>
@@ -158,8 +161,7 @@ masters
</div>
<div class="refsection">
<a name="id-1.16"></a><h2>OPTIONS</h2>
<a name="id-1.17"></a><h2>OPTIONS</h2>
<div class="literallayout"><p><br>
options {<br>
allow-new-zones <em class="replaceable"><code>boolean</code></em>;<br>
@@ -206,9 +208,8 @@ options
check-spf ( warn | ignore );<br>
check-srv-cname ( fail | warn | ignore );<br>
check-wildcard <em class="replaceable"><code>boolean</code></em>;<br>
cleaning-interval <em class="replaceable"><code>integer</code></em>;<br>
clients-per-query <em class="replaceable"><code>integer</code></em>;<br>
cookie-algorithm ( aes | sha1 | sha256 );<br>
cookie-algorithm ( aes | siphash24 );<br>
cookie-secret <em class="replaceable"><code>string</code></em>;<br>
coresize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
datasize ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
@@ -238,10 +239,7 @@ options
dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br>
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-enable <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
dnssec-lookaside ( <em class="replaceable"><code>string</code></em> trust-anchor<br>
    <em class="replaceable"><code>string</code></em> | auto | no );<br>
dnssec-must-be-secure <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br>
@@ -390,11 +388,12 @@ options
resolver-retry-interval <em class="replaceable"><code>integer</code></em>;<br>
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
    <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname |<br>
    disabled | drop | given | no-op | nodata | nxdomain | passthru<br>
    | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ add-soa <em class="replaceable"><code>boolean</code></em> ] [ log<br>
    <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
    nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
    recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ add-soa <em class="replaceable"><code>boolean</code></em> ] [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [<br>
    min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
@@ -461,8 +460,7 @@ options
</div>
<div class="refsection">
<a name="id-1.17"></a><h2>PLUGIN</h2>
<a name="id-1.18"></a><h2>PLUGIN</h2>
<div class="literallayout"><p><br>
plugin ( query ) <em class="replaceable"><code>string</code></em> [ { <em class="replaceable"><code>unspecified-text</code></em><br>
    } ];<br>
@@ -470,8 +468,7 @@ plugin
</div>
<div class="refsection">
<a name="id-1.18"></a><h2>SERVER</h2>
<a name="id-1.19"></a><h2>SERVER</h2>
<div class="literallayout"><p><br>
server <em class="replaceable"><code>netprefix</code></em> {<br>
bogus <em class="replaceable"><code>boolean</code></em>;<br>
@@ -509,8 +506,7 @@ server
</div>
<div class="refsection">
<a name="id-1.19"></a><h2>STATISTICS-CHANNELS</h2>
<a name="id-1.20"></a><h2>STATISTICS-CHANNELS</h2>
<div class="literallayout"><p><br>
statistics-channels {<br>
inet ( <em class="replaceable"><code>ipv4_address</code></em> | <em class="replaceable"><code>ipv6_address</code></em> |<br>
@@ -522,17 +518,17 @@ statistics-channels
</div>
<div class="refsection">
<a name="id-1.20"></a><h2>TRUSTED-KEYS</h2>
<a name="id-1.21"></a><h2>TRUSTED-KEYS</h2>
<p>Deprecated - see DNSSEC-KEYS.</p>
<div class="literallayout"><p><br>
trusted-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
trusted-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
</p></div>
</div>
<div class="refsection">
<a name="id-1.21"></a><h2>VIEW</h2>
<a name="id-1.22"></a><h2>VIEW</h2>
<div class="literallayout"><p><br>
view <em class="replaceable"><code>string</code></em> [ <em class="replaceable"><code>class</code></em> ] {<br>
allow-new-zones <em class="replaceable"><code>boolean</code></em>;<br>
@@ -573,7 +569,6 @@ view
check-spf ( warn | ignore );<br>
check-srv-cname ( fail | warn | ignore );<br>
check-wildcard <em class="replaceable"><code>boolean</code></em>;<br>
cleaning-interval <em class="replaceable"><code>integer</code></em>;<br>
clients-per-query <em class="replaceable"><code>integer</code></em>;<br>
deny-answer-addresses { <em class="replaceable"><code>address_match_element</code></em>; ... } [<br>
    except-from { <em class="replaceable"><code>string</code></em>; ... } ];<br>
@@ -604,10 +599,10 @@ view
dnsrps-options { <em class="replaceable"><code>unspecified-text</code></em> };<br>
dnssec-accept-expired <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-dnskey-kskonly <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-enable <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-keys { <em class="replaceable"><code>string</code></em> ( static-key |<br>
    initial-key ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
dnssec-loadkeys-interval <em class="replaceable"><code>integer</code></em>;<br>
dnssec-lookaside ( <em class="replaceable"><code>string</code></em> trust-anchor<br>
    <em class="replaceable"><code>string</code></em> | auto | no );<br>
dnssec-must-be-secure <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-secure-to-insecure <em class="replaceable"><code>boolean</code></em>;<br>
dnssec-update-mode ( maintain | no-resign );<br>
@@ -642,9 +637,11 @@ view
key-directory <em class="replaceable"><code>quoted_string</code></em>;<br>
lame-ttl <em class="replaceable"><code>ttlval</code></em>;<br>
lmdb-mapsize <em class="replaceable"><code>sizeval</code></em>;<br>
managed-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>string</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... };<br>
managed-keys { <em class="replaceable"><code>string</code></em> (<br>
    static-key | initial-key<br>
    ) <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
masterfile-format ( map | raw | text );<br>
masterfile-style ( full | relative );<br>
match-clients { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
@@ -727,11 +724,12 @@ view
resolver-retry-interval <em class="replaceable"><code>integer</code></em>;<br>
response-padding { <em class="replaceable"><code>address_match_element</code></em>; ... } block-size<br>
    <em class="replaceable"><code>integer</code></em>;<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ log <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname |<br>
    disabled | drop | given | no-op | nodata | nxdomain | passthru<br>
    | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [ recursive-only <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsip-enable <em class="replaceable"><code>boolean</code></em> ] [ nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [<br>
response-policy { zone <em class="replaceable"><code>string</code></em> [ add-soa <em class="replaceable"><code>boolean</code></em> ] [ log<br>
    <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [ min-update-interval<br>
    <em class="replaceable"><code>ttlval</code></em> ] [ policy ( cname | disabled | drop | given | no-op |<br>
    nodata | nxdomain | passthru | tcp-only <em class="replaceable"><code>quoted_string</code></em> ) ] [<br>
    recursive-only <em class="replaceable"><code>boolean</code></em> ] [ nsip-enable <em class="replaceable"><code>boolean</code></em> ] [<br>
    nsdname-enable <em class="replaceable"><code>boolean</code></em> ]; ... } [ add-soa <em class="replaceable"><code>boolean</code></em> ] [<br>
    break-dnssec <em class="replaceable"><code>boolean</code></em> ] [ max-policy-ttl <em class="replaceable"><code>ttlval</code></em> ] [<br>
    min-update-interval <em class="replaceable"><code>ttlval</code></em> ] [ min-ns-dots <em class="replaceable"><code>integer</code></em> ] [<br>
    nsip-wait-recurse <em class="replaceable"><code>boolean</code></em> ] [ qname-wait-recurse <em class="replaceable"><code>boolean</code></em> ]<br>
@@ -793,9 +791,10 @@ view
transfer-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em> | * )<br>
    ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
trust-anchor-telemetry <em class="replaceable"><code>boolean</code></em>; // experimental<br>
trusted-keys { <em class="replaceable"><code>string</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>quoted_string</code></em>;<br>
    ... };<br>
trusted-keys { <em class="replaceable"><code>string</code></em><br>
    <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>integer</code></em><br>
    <em class="replaceable"><code>quoted_string</code></em>; ... }; deprecated<br>
try-tcp-refresh <em class="replaceable"><code>boolean</code></em>;<br>
update-check-ksk <em class="replaceable"><code>boolean</code></em>;<br>
use-alt-transfer-source <em class="replaceable"><code>boolean</code></em>;<br>
@@ -853,7 +852,6 @@ view
masters [ port <em class="replaceable"><code>integer</code></em> ] [ dscp <em class="replaceable"><code>integer</code></em> ] { ( <em class="replaceable"><code>masters</code></em><br>
    | <em class="replaceable"><code>ipv4_address</code></em> [ port <em class="replaceable"><code>integer</code></em> ] | <em class="replaceable"><code>ipv6_address</code></em> [<br>
    port <em class="replaceable"><code>integer</code></em> ] ) [ key <em class="replaceable"><code>string</code></em> ]; ... };<br>
max-ixfr-log-size ( default | unlimited |<br>
max-journal-size ( default | unlimited | <em class="replaceable"><code>sizeval</code></em> );<br>
max-records <em class="replaceable"><code>integer</code></em>;<br>
max-refresh-time <em class="replaceable"><code>integer</code></em>;<br>
@@ -873,7 +871,6 @@ view
notify-source-v6 ( <em class="replaceable"><code>ipv6_address</code></em> | * ) [ port ( <em class="replaceable"><code>integer</code></em><br>
    | * ) ] [ dscp <em class="replaceable"><code>integer</code></em> ];<br>
notify-to-soa <em class="replaceable"><code>boolean</code></em>;<br>
pubkey <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em> <em class="replaceable"><code>integer</code></em><br>
request-expire <em class="replaceable"><code>boolean</code></em>;<br>
request-ixfr <em class="replaceable"><code>boolean</code></em>;<br>
serial-update-method ( date | increment | unixtime );<br>
@@ -907,8 +904,7 @@ view
</div>
<div class="refsection">
<a name="id-1.22"></a><h2>ZONE</h2>
<a name="id-1.23"></a><h2>ZONE</h2>
<div class="literallayout"><p><br>
zone <em class="replaceable"><code>string</code></em> [ <em class="replaceable"><code>class</code></em> ] {<br>
allow-notify { <em class="replaceable"><code>address_match_element</code></em>; ... };<br>
@@ -1007,14 +1003,14 @@ zone
</div>
<div class="refsection">
<a name="id-1.23"></a><h2>FILES</h2>
<a name="id-1.24"></a><h2>FILES</h2>
<p><code class="filename">/etc/named.conf</code>
</p>
</div>
<div class="refsection">
<a name="id-1.24"></a><h2>SEE ALSO</h2>
<a name="id-1.25"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">ddns-confgen</span>(8)
+130 -248
View File
@@ -39,6 +39,7 @@
#include <isc/print.h>
#include <isc/refcount.h>
#include <isc/resource.h>
#include <isc/siphash.h>
#include <isc/socket.h>
#include <isc/stat.h>
#include <isc/stats.h>
@@ -47,7 +48,6 @@
#include <isc/task.h>
#include <isc/timer.h>
#include <isc/util.h>
#include <isc/xml.h>
#include <isccfg/grammar.h>
#include <isccfg/namedconf.h>
@@ -106,9 +106,9 @@
#include <named/config.h>
#include <named/control.h>
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP2)
#include <named/geoip.h>
#endif /* HAVE_GEOIP */
#endif /* HAVE_GEOIP2 */
#include <named/log.h>
#include <named/logconf.h>
#include <named/main.h>
@@ -700,11 +700,9 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
}
static isc_result_t
dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
bool managed, dst_key_t **target, const char **keynamestrp,
isc_mem_t *mctx)
dstkey_fromconfig(const cfg_obj_t *key, bool *initialp, dst_key_t **target,
const char **keynamestrp, isc_mem_t *mctx)
{
dns_rdataclass_t viewclass;
dns_rdata_dnskey_t keystruct;
uint32_t flags, proto, alg;
const char *keystr, *keynamestr;
@@ -729,13 +727,15 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
*keynamestrp = keynamestr;
if (managed) {
if (*initialp) {
const char *initmethod;
initmethod = cfg_obj_asstring(cfg_tuple_get(key, "init"));
if (strcasecmp(initmethod, "initial-key") != 0) {
if (strcasecmp(initmethod, "static-key") == 0) {
*initialp = false;
} else if (strcasecmp(initmethod, "initial-key") != 0) {
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
"managed key '%s': "
"key '%s': "
"invalid initialization method '%s'",
keynamestr, initmethod);
result = ISC_R_FAILURE;
@@ -743,15 +743,12 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
}
}
if (vconfig == NULL)
viewclass = dns_rdataclass_in;
else {
const cfg_obj_t *classobj = cfg_tuple_get(vconfig, "class");
CHECK(named_config_getclass(classobj, dns_rdataclass_in,
&viewclass));
}
keystruct.common.rdclass = viewclass;
/*
* This function should never be reached for non-IN classes.
*/
keystruct.common.rdclass = dns_rdataclass_in;
keystruct.common.rdtype = dns_rdatatype_dnskey;
/*
* The key data in keystruct is not dynamically allocated.
*/
@@ -782,10 +779,12 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
if ((keystruct.algorithm == DST_ALG_RSASHA1) &&
r.length > 1 && r.base[0] == 1 && r.base[1] == 3)
{
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
"%s key '%s' has a weak exponent",
managed ? "managed" : "trusted",
"%s '%s' has a weak exponent",
*initialp ? "initial-key" : "static-key",
keynamestr);
}
CHECK(dns_rdata_fromstruct(NULL,
keystruct.common.rdclass,
@@ -795,7 +794,7 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
isc_buffer_constinit(&namebuf, keynamestr, strlen(keynamestr));
isc_buffer_add(&namebuf, strlen(keynamestr));
CHECK(dns_name_fromtext(keyname, &namebuf, dns_rootname, 0, NULL));
CHECK(dst_key_fromdns(keyname, viewclass, &rrdatabuf,
CHECK(dst_key_fromdns(keyname, dns_rdataclass_in, &rrdatabuf,
mctx, &dstkey));
*target = dstkey;
@@ -821,18 +820,19 @@ dstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
* the memory context to use for allocating memory.
*/
static isc_result_t
process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
dns_keytable_t *secroots, const dns_name_t *keyname_match,
dns_resolver_t *resolver, bool managed, isc_mem_t *mctx)
process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
const dns_name_t *keyname_match, dns_resolver_t *resolver,
bool managed, isc_mem_t *mctx)
{
const dns_name_t *keyname = NULL;
const char *keynamestr = NULL;
dst_key_t *dstkey = NULL;
unsigned int keyalg;
isc_result_t result;
bool initializing = managed;
result = dstkey_fromconfig(vconfig, key, managed, &dstkey, &keynamestr,
mctx);
result = dstkey_fromconfig(key, &initializing,
&dstkey, &keynamestr, mctx);
switch (result) {
case ISC_R_SUCCESS:
@@ -851,8 +851,8 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
* but do not prevent any further ones from being processed.
*/
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
"ignoring %s key for '%s': %s",
managed ? "managed" : "trusted",
"ignoring %s for '%s': %s",
initializing ? "initial-key" : "static-key",
keynamestr, isc_result_totext(result));
return (ISC_R_SUCCESS);
case DST_R_NOCRYPTO:
@@ -860,8 +860,8 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
* Crypto support is not available.
*/
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
"ignoring %s key for '%s': no crypto support",
managed ? "managed" : "trusted",
"ignoring %s for '%s': no crypto support",
initializing ? "initial-key" : "static-key",
keynamestr);
return (result);
default:
@@ -871,8 +871,8 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
* is interrupted.
*/
cfg_obj_log(key, named_g_lctx, ISC_LOG_ERROR,
"configuring %s key for '%s': %s",
managed ? "managed" : "trusted",
"configuring %s for '%s': %s",
initializing ? "initial-key" : "static-key",
keynamestr, isc_result_totext(result));
return (ISC_R_FAILURE);
}
@@ -893,17 +893,21 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
*/
if (!dns_resolver_algorithm_supported(resolver, keyname, keyalg)) {
cfg_obj_log(key, named_g_lctx, ISC_LOG_WARNING,
"ignoring %s key for '%s': algorithm is disabled",
managed ? "managed" : "trusted", keynamestr);
"ignoring %s for '%s': algorithm is disabled",
initializing ? "initial-key" : "static-key",
keynamestr);
goto done;
}
/*
* Add the key to 'secroots'. This key is taken from the
* configuration, so if it's a managed key then it's an initializing
* key; that's why 'managed' is duplicated below.
* Add the key to 'secroots'. Keys from a "dnssec-keys" or
* "managed-keys" statement may be either static or initializing
* keys. If it's not initializing, we don't want to treat it as
* managed, so we use 'initializing' twice here, for both the
* 'managed' and 'initializing' arguments to dns_keytable_add().
*/
result = dns_keytable_add(secroots, managed, managed, &dstkey);
result = dns_keytable_add(secroots, initializing,
initializing, &dstkey);
done:
/*
@@ -924,8 +928,7 @@ process_key(const cfg_obj_t *key, const cfg_obj_t *vconfig,
* an initializing key.
*/
static isc_result_t
load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
dns_view_t *view, bool managed,
load_view_keys(const cfg_obj_t *keys, dns_view_t *view, bool managed,
const dns_name_t *keyname, isc_mem_t *mctx)
{
const cfg_listelt_t *elt, *elt2;
@@ -945,7 +948,7 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
elt2 != NULL;
elt2 = cfg_list_next(elt2))
{
CHECK(process_key(cfg_listelt_value(elt2), vconfig,
CHECK(process_key(cfg_listelt_value(elt2),
secroots, keyname, view->resolver,
managed, mctx));
}
@@ -999,7 +1002,9 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
const cfg_obj_t *view_keys = NULL;
const cfg_obj_t *global_keys = NULL;
const cfg_obj_t *view_managed_keys = NULL;
const cfg_obj_t *view_dnssec_keys = NULL;
const cfg_obj_t *global_managed_keys = NULL;
const cfg_obj_t *global_dnssec_keys = NULL;
const cfg_obj_t *maps[4];
const cfg_obj_t *voptions = NULL;
const cfg_obj_t *options = NULL;
@@ -1019,15 +1024,24 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
if (voptions != NULL) {
(void) cfg_map_get(voptions, "trusted-keys",
&view_keys);
/* managed-keys and dnssec-keys are synonyms. */
(void) cfg_map_get(voptions, "managed-keys",
&view_managed_keys);
(void) cfg_map_get(voptions, "dnssec-keys",
&view_dnssec_keys);
maps[i++] = voptions;
}
}
if (config != NULL) {
(void)cfg_map_get(config, "trusted-keys", &global_keys);
/* managed-keys and dnssec-keys are synonyms. */
(void)cfg_map_get(config, "managed-keys", &global_managed_keys);
(void)cfg_map_get(config, "dnssec-keys", &global_dnssec_keys);
(void)cfg_map_get(config, "options", &options);
if (options != NULL) {
maps[i++] = options;
@@ -1055,11 +1069,10 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
if (auto_root && view->rdclass == dns_rdataclass_in) {
const cfg_obj_t *builtin_keys = NULL;
const cfg_obj_t *builtin_managed_keys = NULL;
/*
* If bind.keys exists and is populated, it overrides
* the managed-keys clause hard-coded in named_g_config.
* the dnssec-keys clause hard-coded in named_g_config.
*/
if (bindkeys != NULL) {
isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
@@ -1068,13 +1081,10 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
"from '%s'",
view->name, named_g_server->bindkeysfile);
(void)cfg_map_get(bindkeys, "trusted-keys",
(void)cfg_map_get(bindkeys, "dnssec-keys",
&builtin_keys);
(void)cfg_map_get(bindkeys, "managed-keys",
&builtin_managed_keys);
if ((builtin_keys == NULL) &&
(builtin_managed_keys == NULL))
if (builtin_keys == NULL) {
isc_log_write(named_g_lctx,
DNS_LOGCATEGORY_SECURITY,
NAMED_LOGMODULE_SERVER,
@@ -1082,29 +1092,23 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
"dnssec-validation auto: "
"WARNING: root zone key "
"not found");
}
}
if ((builtin_keys == NULL) &&
(builtin_managed_keys == NULL))
{
if (builtin_keys == NULL) {
isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"using built-in root key for view %s",
view->name);
(void)cfg_map_get(named_g_config, "trusted-keys",
(void)cfg_map_get(named_g_config, "dnssec-keys",
&builtin_keys);
(void)cfg_map_get(named_g_config, "managed-keys",
&builtin_managed_keys);
}
if (builtin_keys != NULL)
CHECK(load_view_keys(builtin_keys, vconfig, view,
false, dns_rootname, mctx));
if (builtin_managed_keys != NULL)
CHECK(load_view_keys(builtin_managed_keys, vconfig,
view, true, dns_rootname,
mctx));
if (builtin_keys != NULL) {
CHECK(load_view_keys(builtin_keys, view, true,
dns_rootname, mctx));
}
if (!keyloaded(view, dns_rootname)) {
isc_log_write(named_g_lctx, DNS_LOGCATEGORY_SECURITY,
@@ -1115,16 +1119,16 @@ configure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
}
}
CHECK(load_view_keys(view_keys, vconfig, view, false,
NULL, mctx));
CHECK(load_view_keys(view_managed_keys, vconfig, view, true,
NULL, mctx));
CHECK(load_view_keys(view_keys, view, false, NULL, mctx));
CHECK(load_view_keys(view_managed_keys, view, true, NULL, mctx));
CHECK(load_view_keys(view_dnssec_keys, view, true, NULL, mctx));
if (view->rdclass == dns_rdataclass_in) {
CHECK(load_view_keys(global_keys, vconfig, view, false,
CHECK(load_view_keys(global_keys, view, false, NULL, mctx));
CHECK(load_view_keys(global_managed_keys, view, true,
NULL, mctx));
CHECK(load_view_keys(global_dnssec_keys, view, true,
NULL, mctx));
CHECK(load_view_keys(global_managed_keys, vconfig, view,
true, NULL, mctx));
}
/*
@@ -1804,7 +1808,6 @@ cache_reusable(dns_view_t *originview, dns_view_t *view,
static bool
cache_sharable(dns_view_t *originview, dns_view_t *view,
bool new_zero_no_soattl,
unsigned int new_cleaning_interval,
uint64_t new_max_cache_size,
uint32_t new_stale_ttl)
{
@@ -1819,9 +1822,7 @@ cache_sharable(dns_view_t *originview, dns_view_t *view,
* Check other cache related parameters that must be consistent among
* the sharing views.
*/
if (dns_cache_getcleaninginterval(originview->cache) !=
new_cleaning_interval ||
dns_cache_getservestalettl(originview->cache) != new_stale_ttl ||
if (dns_cache_getservestalettl(originview->cache) != new_stale_ttl ||
dns_cache_getcachesize(originview->cache) != new_max_cache_size) {
return (false);
}
@@ -1903,7 +1904,7 @@ dns64_reverse(dns_view_t *view, isc_mem_t *mctx, isc_netaddr_t *na,
dns_zone_setclass(zone, view->rdclass);
dns_zone_settype(zone, dns_zone_master);
dns_zone_setstats(zone, named_g_server->zonestats);
CHECK(dns_zone_setdbtype(zone, dns64_dbtypec, dns64_dbtype));
dns_zone_setdbtype(zone, dns64_dbtypec, dns64_dbtype);
if (view->queryacl != NULL)
dns_zone_setqueryacl(zone, view->queryacl);
if (view->queryonacl != NULL)
@@ -1944,10 +1945,6 @@ conf_dnsrps_sadd(conf_dnsrps_ctx_t *ctx, const char *p, ...) {
if (ctx->cstr == NULL) {
ctx->cstr = isc_mem_get(ctx->mctx, 256);
if (ctx->cstr == NULL) {
ctx->result = ISC_R_NOMEMORY;
return (false);
}
ctx->cstr[0] = '\0';
ctx->cstr_size = 256;
}
@@ -1963,10 +1960,6 @@ conf_dnsrps_sadd(conf_dnsrps_ctx_t *ctx, const char *p, ...) {
new_cstr_size = ((cur_len + new_len)/256 + 1) * 256;
new_cstr = isc_mem_get(ctx->mctx, new_cstr_size);
if (new_cstr == NULL) {
ctx->result = ISC_R_NOMEMORY;
return (false);
}
memmove(new_cstr, ctx->cstr, cur_len);
isc_mem_put(ctx->mctx, ctx->cstr, ctx->cstr_size);
@@ -3417,9 +3410,9 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view,
zone = myzone;
CHECK(dns_zone_setorigin(zone, name));
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
if (db == NULL)
CHECK(dns_zone_setdbtype(zone, empty_dbtypec,
empty_dbtype));
if (db == NULL) {
dns_zone_setdbtype(zone, empty_dbtypec, empty_dbtype);
}
dns_zone_setclass(zone, view->rdclass);
dns_zone_settype(zone, dns_zone_master);
dns_zone_setstats(zone, named_g_server->zonestats);
@@ -3790,7 +3783,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
const cfg_obj_t *zonelist;
const cfg_obj_t *dlzlist;
const cfg_obj_t *dlz;
const cfg_obj_t *dlvobj = NULL;
unsigned int dlzargc;
char **dlzargv;
const cfg_obj_t *dyndb_list, *plugin_list;
@@ -3800,7 +3792,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
in_port_t port;
dns_cache_t *cache = NULL;
isc_result_t result;
unsigned int cleaning_interval;
size_t max_cache_size;
uint32_t max_cache_size_percent = 0;
size_t max_adb_size;
@@ -4014,11 +4005,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
* Obtain configuration parameters that affect the decision of whether
* we can reuse/share an existing cache.
*/
obj = NULL;
result = named_config_get(maps, "cleaning-interval", &obj);
INSIST(result == ISC_R_SUCCESS);
cleaning_interval = cfg_obj_asuint32(obj) * 60;
obj = NULL;
result = named_config_get(maps, "max-cache-size", &obj);
INSIST(result == ISC_R_SUCCESS);
@@ -4306,8 +4292,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
nsc = cachelist_find(cachelist, cachename, view->rdclass);
if (nsc != NULL) {
if (!cache_sharable(nsc->primaryview, view, zero_no_soattl,
cleaning_interval, max_cache_size,
max_stale_ttl))
max_cache_size, max_stale_ttl))
{
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
@@ -4378,10 +4363,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
isc_mem_detach(&hmctx);
}
nsc = isc_mem_get(mctx, sizeof(*nsc));
if (nsc == NULL) {
result = ISC_R_NOMEMORY;
goto cleanup;
}
nsc->cache = NULL;
dns_cache_attach(cache, &nsc->cache);
nsc->primaryview = view;
@@ -4405,7 +4386,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
CHECK(dns_cache_load(cache));
}
dns_cache_setcleaninginterval(cache, cleaning_interval);
dns_cache_setcachesize(cache, max_cache_size);
dns_cache_setservestalettl(cache, max_stale_ttl);
@@ -4633,7 +4613,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
}
/*
* Set supported DS/DLV digest types.
* Set supported DS digest types.
*/
dns_resolver_reset_ds_digests(view->resolver);
disabled = NULL;
@@ -5223,57 +5203,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
view->prefetch_eligible = view->prefetch_trigger + 6;
}
obj = NULL;
result = named_config_get(optionmaps, "dnssec-lookaside", &obj);
if (result == ISC_R_SUCCESS) {
/* "auto" is deprecated, log a warning if seen */
const char *dom;
dlvobj = cfg_listelt_value(cfg_list_first(obj));
dom = cfg_obj_asstring(cfg_tuple_get(dlvobj, "domain"));
if (cfg_obj_isvoid(cfg_tuple_get(dlvobj, "trust-anchor"))) {
/* If "no", skip; if "auto", log warning */
if (!strcasecmp(dom, "no")) {
result = ISC_R_NOTFOUND;
} else if (!strcasecmp(dom, "auto")) {
/*
* Warning logged by libbind9.
*/
result = ISC_R_NOTFOUND;
}
}
}
if (result == ISC_R_SUCCESS) {
dns_name_t *dlv, *iscdlv;
dns_fixedname_t f;
/* Also log a warning if manually configured to dlv.isc.org */
iscdlv = dns_fixedname_initname(&f);
CHECK(dns_name_fromstring(iscdlv, "dlv.isc.org", 0, NULL));
for (element = cfg_list_first(obj);
element != NULL;
element = cfg_list_next(element))
{
obj = cfg_listelt_value(element);
obj = cfg_tuple_get(obj, "trust-anchor");
dlv = dns_fixedname_name(&view->dlv_fixed);
CHECK(dns_name_fromstring(dlv, cfg_obj_asstring(obj),
DNS_NAME_DOWNCASE, NULL));
if (dns_name_equal(dlv, iscdlv)) {
/*
* Warning logged by libbind9.
*/
view->dlv = NULL;
} else {
view->dlv = dlv;
}
}
} else {
view->dlv = NULL;
}
/*
* For now, there is only one kind of trusted keys, the
* "security roots".
@@ -5803,10 +5732,6 @@ configure_forward(const cfg_obj_t *config, dns_view_t *view,
{
const cfg_obj_t *forwarder = cfg_listelt_value(element);
fwd = isc_mem_get(view->mctx, sizeof(dns_forwarder_t));
if (fwd == NULL) {
result = ISC_R_NOMEMORY;
goto cleanup;
}
fwd->addr = *cfg_obj_assockaddr(forwarder);
if (isc_sockaddr_getport(&fwd->addr) == 0)
isc_sockaddr_setport(&fwd->addr, port);
@@ -6864,9 +6789,6 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
view->name, namebuf);
tat = isc_mem_get(dotat_arg->view->mctx, sizeof(*tat));
if (tat == NULL) {
return;
}
tat->mctx = NULL;
tat->task = NULL;
@@ -6995,8 +6917,6 @@ setstring(named_server_t *server, char **field, const char *value) {
if (value != NULL) {
copy = isc_mem_strdup(server->mctx, value);
if (copy == NULL)
return (ISC_R_NOMEMORY);
} else {
copy = NULL;
}
@@ -7333,15 +7253,12 @@ configure_session_key(const cfg_obj_t **maps, named_server_t *server,
INSIST(server->session_keyalg == DST_ALG_UNKNOWN);
INSIST(server->session_keybits == 0);
server->session_keyname = isc_mem_get(mctx, sizeof(dns_name_t));
if (server->session_keyname == NULL)
goto cleanup;
server->session_keyname = isc_mem_get(mctx,
sizeof(dns_name_t));
dns_name_init(server->session_keyname, NULL);
CHECK(dns_name_dup(keyname, mctx, server->session_keyname));
server->session_keyfile = isc_mem_strdup(mctx, keyfile);
if (server->session_keyfile == NULL)
goto cleanup;
server->session_keyalg = algtype;
server->session_keybits = bits;
@@ -7544,10 +7461,6 @@ setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
}
nzcfg = isc_mem_get(view->mctx, sizeof(*nzcfg));
if (nzcfg == NULL) {
dns_view_setnewzones(view, false, NULL, NULL, 0ULL);
return (ISC_R_NOMEMORY);
}
/*
* We attach the parser that was used for config as well
@@ -8036,7 +7949,7 @@ check_lockfile(named_server_t *server, const cfg_obj_t *config,
"'lock-file' has no effect "
"because the server was run with -X");
server->lockfile = isc_mem_strdup(server->mctx,
named_g_defaultlockfile);
named_g_defaultlockfile);
} else {
filename = cfg_obj_asstring(obj);
server->lockfile = isc_mem_strdup(server->mctx,
@@ -8269,7 +8182,7 @@ load_configuration(const char *filename, named_server_t *server,
}
isc_socketmgr_setreserved(named_g_socketmgr, reserved);
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP2)
/*
* Initialize GeoIP databases from the configured location.
* This should happen before configuring any ACLs, so that we
@@ -8278,15 +8191,14 @@ load_configuration(const char *filename, named_server_t *server,
*/
obj = NULL;
result = named_config_get(maps, "geoip-directory", &obj);
if (result == ISC_R_SUCCESS && cfg_obj_isstring(obj)) {
INSIST(result == ISC_R_SUCCESS);
if (cfg_obj_isstring(obj)) {
char *dir;
DE_CONST(cfg_obj_asstring(obj), dir);
named_geoip_load(dir);
} else {
named_geoip_load(NULL);
}
named_g_aclconfctx->geoip = named_g_geoip;
#endif /* HAVE_GEOIP */
#endif /* HAVE_GEOIP2 */
/*
* Configure various server options.
@@ -9138,12 +9050,10 @@ load_configuration(const char *filename, named_server_t *server,
obj = NULL;
result = named_config_get(maps, "cookie-algorithm", &obj);
INSIST(result == ISC_R_SUCCESS);
if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0) {
if (strcasecmp(cfg_obj_asstring(obj), "siphash24") == 0) {
server->sctx->cookiealg = ns_cookiealg_siphash24;
} else if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0) {
server->sctx->cookiealg = ns_cookiealg_aes;
} else if (strcasecmp(cfg_obj_asstring(obj), "sha1") == 0) {
server->sctx->cookiealg = ns_cookiealg_sha1;
} else if (strcasecmp(cfg_obj_asstring(obj), "sha256") == 0) {
server->sctx->cookiealg = ns_cookiealg_sha256;
} else {
INSIST(0);
ISC_UNREACHABLE();
@@ -9180,10 +9090,6 @@ load_configuration(const char *filename, named_server_t *server,
} else {
altsecret = isc_mem_get(server->sctx->mctx,
sizeof(*altsecret));
if (altsecret == NULL) {
result = ISC_R_NOMEMORY;
goto cleanup;
}
isc_buffer_init(&b, altsecret->secret,
sizeof(altsecret->secret));
result = isc_hex_decodestring(str, &b);
@@ -9201,30 +9107,18 @@ load_configuration(const char *filename, named_server_t *server,
usedlength = isc_buffer_usedlength(&b);
switch (server->sctx->cookiealg) {
case ns_cookiealg_siphash24:
expectedlength = ISC_SIPHASH24_KEY_LENGTH;
if (usedlength != expectedlength) {
CHECKM(ISC_R_RANGE,
"SipHash-2-4 cookie-secret must be 128 bits");
}
break;
case ns_cookiealg_aes:
expectedlength = ISC_AES128_KEYLENGTH;
if (usedlength != expectedlength) {
CHECKM(ISC_R_RANGE,
"AES cookie-secret must be "
"128 bits");
}
break;
case ns_cookiealg_sha1:
expectedlength =
isc_md_type_get_size(ISC_MD_SHA1);
if (usedlength != expectedlength) {
CHECKM(ISC_R_RANGE,
"SHA1 cookie-secret must be "
"160 bits");
}
break;
case ns_cookiealg_sha256:
expectedlength =
isc_md_type_get_size(ISC_MD_SHA256);
if (usedlength != expectedlength) {
CHECKM(ISC_R_RANGE,
"SHA256 cookie-secret must be "
"256 bits");
"AES cookie-secret must be 128 bits");
}
break;
}
@@ -9404,7 +9298,7 @@ view_loaded(void *arg) {
"FIPS mode is %s",
FIPS_mode() ? "enabled" : "disabled");
#endif
server->reload_in_progress = false;
server->reload_status = NAMED_RELOAD_DONE;
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_NOTICE,
@@ -9420,9 +9314,7 @@ load_zones(named_server_t *server, bool init, bool reconfig) {
dns_view_t *view;
ns_zoneload_t *zl;
zl = isc_mem_get(server->mctx, sizeof (*zl));
if (zl == NULL)
return (ISC_R_NOMEMORY);
zl = isc_mem_get(server->mctx, sizeof(*zl));
zl->server = server;
zl->reconfig = reconfig;
@@ -9489,6 +9381,7 @@ static void
run_server(isc_task_t *task, isc_event_t *event) {
isc_result_t result;
named_server_t *server = (named_server_t *)event->ev_arg;
dns_geoip_databases_t *geoip;
INSIST(task == server->task);
@@ -9499,25 +9392,19 @@ run_server(isc_task_t *task, isc_event_t *event) {
dns_dispatchmgr_setstats(named_g_dispatchmgr, server->resolverstats);
#ifdef HAVE_GEOIP
CHECKFATAL(ns_interfacemgr_create(named_g_mctx, server->sctx,
named_g_taskmgr, named_g_timermgr,
named_g_socketmgr,
named_g_dispatchmgr,
server->task, named_g_udpdisp,
named_g_geoip,
&server->interfacemgr),
"creating interface manager");
#if defined(HAVE_GEOIP2)
geoip = named_g_geoip;
#else
geoip = NULL;
#endif
CHECKFATAL(ns_interfacemgr_create(named_g_mctx, server->sctx,
named_g_taskmgr, named_g_timermgr,
named_g_socketmgr,
named_g_dispatchmgr,
server->task, named_g_udpdisp,
NULL,
server->task, named_g_udpdisp, geoip,
&server->interfacemgr),
"creating interface manager");
#endif
CHECKFATAL(isc_timer_create(named_g_timermgr, isc_timertype_inactive,
NULL, NULL, server->task,
@@ -9639,9 +9526,9 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
#ifdef HAVE_DNSTAP
dns_dt_shutdown();
#endif
#ifdef HAVE_GEOIP
dns_geoip_shutdown();
#endif
#if defined(HAVE_GEOIP2)
named_geoip_shutdown();
#endif /* HAVE_GEOIP2 */
dns_db_detach(&server->in_roothints);
@@ -9740,7 +9627,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
CHECKFATAL(server->reload_event == NULL ?
ISC_R_NOMEMORY : ISC_R_SUCCESS,
"allocating reload event");
server->reload_in_progress = true;
server->reload_status = NAMED_RELOAD_IN_PROGRESS;
/*
* Setup the server task, which is responsible for coordinating
@@ -9757,14 +9644,14 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
&server->sctx),
"creating server context");
#ifdef HAVE_GEOIP
#if defined(HAVE_GEOIP2)
/*
* GeoIP must be initialized before the interface
* manager (which includes the ACL environment)
* is created
*/
named_geoip_init();
#endif
#endif /* HAVE_GEOIP2 */
#ifdef ENABLE_AFL
server->sctx->fuzztype = named_g_fuzz_type;
@@ -9979,10 +9866,6 @@ named_add_reserved_dispatch(named_server_t *server,
}
dispatch = isc_mem_get(server->mctx, sizeof(*dispatch));
if (dispatch == NULL) {
result = ISC_R_NOMEMORY;
goto cleanup;
}
dispatch->addr = *addr;
dispatch->dispatchgen = server->dispatchgen;
@@ -10044,6 +9927,7 @@ loadconfig(named_server_t *server) {
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"reloading configuration failed: %s",
isc_result_totext(result));
server->reload_status = NAMED_RELOAD_FAILED;
}
return (result);
@@ -10052,20 +9936,21 @@ loadconfig(named_server_t *server) {
static isc_result_t
reload(named_server_t *server) {
isc_result_t result;
server->reload_in_progress = true;
server->reload_status = NAMED_RELOAD_IN_PROGRESS;
CHECK(loadconfig(server));
result = load_zones(server, false, false);
if (result == ISC_R_SUCCESS)
if (result == ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"reloading zones succeeded");
else
} else {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"reloading zones failed: %s",
isc_result_totext(result));
server->reload_status = NAMED_RELOAD_FAILED;
}
cleanup:
return (result);
}
@@ -10399,20 +10284,22 @@ named_server_reloadcommand(named_server_t *server, isc_lex_t *lex,
isc_result_t
named_server_reconfigcommand(named_server_t *server) {
isc_result_t result;
server->reload_in_progress = true;
server->reload_status = NAMED_RELOAD_IN_PROGRESS;
CHECK(loadconfig(server));
result = load_zones(server, false, true);
if (result == ISC_R_SUCCESS)
if (result == ISC_R_SUCCESS) {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_INFO,
"scheduled loading new zones");
else
} else {
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"loading new zones failed: %s",
isc_result_totext(result));
server->reload_status = NAMED_RELOAD_FAILED;
}
cleanup:
return (result);
}
@@ -10652,8 +10539,6 @@ add_zone_tolist(dns_zone_t *zone, void *uap) {
struct zonelistentry *zle;
zle = isc_mem_get(dctx->mctx, sizeof *zle);
if (zle == NULL)
return (ISC_R_NOMEMORY);
zle->zone = NULL;
dns_zone_attach(zone, &zle->zone);
ISC_LINK_INIT(zle, link);
@@ -10676,8 +10561,6 @@ add_view_tolist(struct dumpcontext *dctx, dns_view_t *view) {
return (ISC_R_SUCCESS);
vle = isc_mem_get(dctx->mctx, sizeof *vle);
if (vle == NULL)
return (ISC_R_NOMEMORY);
vle->view = NULL;
dns_view_attach(view, &vle->view);
ISC_LINK_INIT(vle, link);
@@ -10870,8 +10753,6 @@ named_server_dumpdb(named_server_t *server, isc_lex_t *lex,
return (ISC_R_UNEXPECTEDEND);
dctx = isc_mem_get(server->mctx, sizeof(*dctx));
if (dctx == NULL)
return (ISC_R_NOMEMORY);
dctx->mctx = server->mctx;
dctx->dumpcache = true;
@@ -11546,8 +11427,11 @@ named_server_status(named_server_t *server, isc_buffer_t **text) {
isc_quota_getmax(&server->sctx->tcpquota));
CHECK(putstr(text, line));
if (server->reload_in_progress) {
CHECK(putstr(text, "reload/reconfig in progress"));
if (server->reload_status != NAMED_RELOAD_DONE) {
snprintf(line, sizeof(line), "reload/reconfig %s\n",
server->reload_status == NAMED_RELOAD_FAILED
? "failed" : "in progress");
CHECK(putstr(text, line));
}
CHECK(putstr(text, "server is up and running"));
@@ -11604,7 +11488,7 @@ delete_keynames(dns_tsig_keyring_t *ring, char *target,
origin = dns_fixedname_initname(&fixedorigin);
again:
dns_rbtnodechain_init(&chain, ring->mctx);
dns_rbtnodechain_init(&chain);
result = dns_rbtnodechain_first(&chain, ring->keys, &foundname,
origin);
if (result == ISC_R_NOTFOUND) {
@@ -11720,7 +11604,7 @@ list_keynames(dns_view_t *view, dns_tsig_keyring_t *ring, isc_buffer_t **text,
dns_name_init(&foundname, NULL);
origin = dns_fixedname_initname(&fixedorigin);
dns_rbtnodechain_init(&chain, ring->mctx);
dns_rbtnodechain_init(&chain);
result = dns_rbtnodechain_first(&chain, ring->keys, &foundname,
origin);
if (result == ISC_R_NOTFOUND) {
@@ -13675,8 +13559,6 @@ named_server_delzone(named_server_t *server, isc_lex_t *lex,
/* Send cleanup event */
dz = isc_mem_get(named_g_mctx, sizeof(*dz));
if (dz == NULL)
CHECK(ISC_R_NOMEMORY);
dz->cleanup = cleanup;
dz->zone = NULL;
+203 -39
View File
@@ -16,7 +16,6 @@
#include <isc/buffer.h>
#include <isc/httpd.h>
#include <isc/json.h>
#include <isc/mem.h>
#include <isc/once.h>
#include <isc/print.h>
@@ -43,6 +42,16 @@
#include <named/server.h>
#include <named/statschannel.h>
#if HAVE_JSON_C
#include <json_object.h>
#include <linkhash.h>
#endif /* HAVE_JSON_C */
#if HAVE_LIBXML2
#include <libxml/xmlwriter.h>
#define ISC_XMLCHAR (const xmlChar *)
#endif /* HAVE_LIBXML2 */
#include "bind9.xsl.h"
struct named_statschannel {
@@ -74,7 +83,7 @@ stats_dumparg {
static isc_once_t once = ISC_ONCE_INIT;
#if defined(HAVE_LIBXML2) || defined(HAVE_JSON)
#if defined(HAVE_LIBXML2) || defined(HAVE_JSON_C)
#define EXTENDED_STATS
#else
#undef EXTENDED_STATS
@@ -1067,10 +1076,10 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
stats_dumparg_t dumparg;
FILE *fp;
#ifdef HAVE_LIBXML2
xmlTextWriterPtr writer;
void *writer;
int xmlrc;
#endif
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
json_object *job, *cat, *counter;
#endif
@@ -1086,7 +1095,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
memset(values, 0, sizeof(values[0]) * ncounters);
isc_stats_dump(stats, generalstat_dump, &dumparg, options);
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
cat = job = (json_object *) arg;
if (ncounters > 0 && type == isc_statsformat_json) {
if (category != NULL) {
@@ -1113,7 +1122,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
break;
case isc_statsformat_xml:
#ifdef HAVE_LIBXML2
writer = (xmlTextWriterPtr) arg;
writer = arg;
if (category != NULL) {
/* <NameOfCategory> */
@@ -1161,7 +1170,7 @@ dump_counters(isc_stats_t *stats, isc_statsformat_t type, void *arg,
#endif
break;
case isc_statsformat_json:
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
counter = json_object_new_int64(value);
if (counter == NULL)
return (ISC_R_NOMEMORY);
@@ -1187,10 +1196,10 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
stats_dumparg_t *dumparg = arg;
FILE *fp;
#ifdef HAVE_LIBXML2
xmlTextWriterPtr writer;
void *writer;
int xmlrc;
#endif
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
json_object *zoneobj, *obj;
#endif
@@ -1224,7 +1233,7 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
#endif
break;
case isc_statsformat_json:
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
zoneobj = (json_object *) dumparg->arg;
obj = json_object_new_int64(val);
if (obj == NULL)
@@ -1244,6 +1253,12 @@ rdtypestat_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
#endif
}
static bool
rdatastatstype_attr(dns_rdatastatstype_t type, unsigned int attr)
{
return ((DNS_RDATASTATSTYPE_ATTR(type) & attr) != 0);
}
static void
rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
stats_dumparg_t *dumparg = arg;
@@ -1252,11 +1267,12 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
const char *typestr;
bool nxrrset = false;
bool stale = false;
bool ancient = false;
#ifdef HAVE_LIBXML2
xmlTextWriterPtr writer;
void *writer;
int xmlrc;
#endif
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
json_object *zoneobj, *obj;
char buf[1024];
#endif
@@ -1273,19 +1289,16 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
typestr = typebuf;
}
if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_NXRRSET)
!= 0)
nxrrset = true;
if ((DNS_RDATASTATSTYPE_ATTR(type) & DNS_RDATASTATSTYPE_ATTR_STALE)
!= 0)
stale = true;
nxrrset = rdatastatstype_attr(type, DNS_RDATASTATSTYPE_ATTR_NXRRSET);
stale = rdatastatstype_attr(type, DNS_RDATASTATSTYPE_ATTR_STALE);
ancient = rdatastatstype_attr(type, DNS_RDATASTATSTYPE_ATTR_ANCIENT);
switch (dumparg->type) {
case isc_statsformat_file:
fp = dumparg->arg;
fprintf(fp, "%20" PRIu64 " %s%s%s\n", val,
stale ? "#" : "", nxrrset ? "!" : "", typestr);
fprintf(fp, "%20" PRIu64 " %s%s%s%s\n", val,
ancient ? "~" : "", stale ? "#" : "",
nxrrset ? "!" : "", typestr);
break;
case isc_statsformat_xml:
#ifdef HAVE_LIBXML2
@@ -1293,7 +1306,8 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "rrset"));
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "name"));
TRY0(xmlTextWriterWriteFormatString(writer, "%s%s%s",
TRY0(xmlTextWriterWriteFormatString(writer, "%s%s%s%s",
ancient ? "~" : "",
stale ? "#" : "",
nxrrset ? "!" : "", typestr));
TRY0(xmlTextWriterEndElement(writer)); /* name */
@@ -1308,9 +1322,9 @@ rdatasetstats_dump(dns_rdatastatstype_t type, uint64_t val, void *arg) {
#endif
break;
case isc_statsformat_json:
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
zoneobj = (json_object *) dumparg->arg;
snprintf(buf, sizeof(buf), "%s%s%s",
snprintf(buf, sizeof(buf), "%s%s%s%s", ancient ? "~" : "",
stale ? "#" : "", nxrrset ? "!" : "", typestr);
obj = json_object_new_int64(val);
if (obj == NULL)
@@ -1337,10 +1351,10 @@ opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) {
char codebuf[64];
stats_dumparg_t *dumparg = arg;
#ifdef HAVE_LIBXML2
xmlTextWriterPtr writer;
void *writer;
int xmlrc;
#endif
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
json_object *zoneobj, *obj;
#endif
@@ -1366,7 +1380,7 @@ opcodestat_dump(dns_opcode_t code, uint64_t val, void *arg) {
#endif
break;
case isc_statsformat_json:
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
zoneobj = (json_object *) dumparg->arg;
obj = json_object_new_int64(val);
if (obj == NULL)
@@ -1394,10 +1408,10 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
char codebuf[64];
stats_dumparg_t *dumparg = arg;
#ifdef HAVE_LIBXML2
xmlTextWriterPtr writer;
void *writer;
int xmlrc;
#endif
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
json_object *zoneobj, *obj;
#endif
@@ -1423,7 +1437,7 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
#endif
break;
case isc_statsformat_json:
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
zoneobj = (json_object *) dumparg->arg;
obj = json_object_new_int64(val);
if (obj == NULL)
@@ -1444,6 +1458,62 @@ rcodestat_dump(dns_rcode_t code, uint64_t val, void *arg) {
#endif
}
#if defined(EXTENDED_STATS)
static void
dnssecsignstat_dump(dns_keytag_t tag, uint64_t val, void *arg) {
FILE *fp;
char tagbuf[64];
stats_dumparg_t *dumparg = arg;
#ifdef HAVE_LIBXML2
xmlTextWriterPtr writer;
int xmlrc;
#endif
#ifdef HAVE_JSON_C
json_object *zoneobj, *obj;
#endif
snprintf(tagbuf, sizeof(tagbuf), "%u", tag);
switch (dumparg->type) {
case isc_statsformat_file:
fp = dumparg->arg;
fprintf(fp, "%20" PRIu64 " %s\n", val, tagbuf);
break;
case isc_statsformat_xml:
#ifdef HAVE_LIBXML2
writer = dumparg->arg;
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "counter"));
TRY0(xmlTextWriterWriteAttribute(writer, ISC_XMLCHAR "name",
ISC_XMLCHAR tagbuf ));
TRY0(xmlTextWriterWriteFormatString(writer,
"%" PRIu64,
val));
TRY0(xmlTextWriterEndElement(writer)); /* counter */
#endif
break;
case isc_statsformat_json:
#ifdef HAVE_JSON_C
zoneobj = (json_object *) dumparg->arg;
obj = json_object_new_int64(val);
if (obj == NULL) {
return;
}
json_object_object_add(zoneobj, tagbuf, obj);
#endif
break;
}
return;
#ifdef HAVE_LIBXML2
error:
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
"failed at dnssecsignstat_dump()");
dumparg->result = ISC_R_FAILURE;
return;
#endif
}
#endif /* defined(EXTENDED_STATS) */
#ifdef HAVE_LIBXML2
/*
* Which statistics to include when rendering to XML
@@ -1506,6 +1576,8 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
isc_stats_t *zonestats;
isc_stats_t *gluecachestats;
dns_stats_t *rcvquerystats;
dns_stats_t *dnssecsignstats;
dns_stats_t *dnssecrefreshstats;
uint64_t nsstat_values[ns_statscounter_max];
uint64_t gluecachestats_values[dns_gluecachestatscounter_max];
@@ -1533,8 +1605,8 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "counters"));
TRY0(xmlTextWriterWriteAttribute(writer,
ISC_XMLCHAR "type",
ISC_XMLCHAR "gluecache"));
ISC_XMLCHAR "type",
ISC_XMLCHAR "gluecache"));
result = dump_counters(gluecachestats,
isc_statsformat_xml,
@@ -1567,6 +1639,46 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
/* counters type="qtype"*/
TRY0(xmlTextWriterEndElement(writer));
}
dnssecsignstats = dns_zone_getdnssecsignstats(zone);
if (dnssecsignstats != NULL) {
TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "counters"));
TRY0(xmlTextWriterWriteAttribute(writer,
ISC_XMLCHAR "type",
ISC_XMLCHAR "dnssec-sign"));
dumparg.result = ISC_R_SUCCESS;
dns_dnssecsignstats_dump(dnssecsignstats,
dnssecsignstat_dump,
&dumparg, 0);
if(dumparg.result != ISC_R_SUCCESS) {
goto error;
}
/* counters type="dnssec-sign"*/
TRY0(xmlTextWriterEndElement(writer));
}
dnssecrefreshstats = dns_zone_getdnssecrefreshstats(zone);
if (dnssecrefreshstats != NULL) {
TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "counters"));
TRY0(xmlTextWriterWriteAttribute(writer,
ISC_XMLCHAR "type",
ISC_XMLCHAR "dnssec-refresh"));
dumparg.result = ISC_R_SUCCESS;
dns_dnssecsignstats_dump(dnssecrefreshstats,
dnssecsignstat_dump,
&dumparg, 0);
if(dumparg.result != ISC_R_SUCCESS) {
goto error;
}
/* counters type="dnssec-refresh"*/
TRY0(xmlTextWriterEndElement(writer));
}
}
TRY0(xmlTextWriterEndElement(writer)); /* zone */
@@ -2195,7 +2307,7 @@ render_xml_traffic(const char *url, isc_httpdurl_t *urlinfo,
#endif /* HAVE_LIBXML2 */
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
/*
* Which statistics to include when rendering to JSON
*/
@@ -2287,6 +2399,8 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
isc_stats_t *zonestats;
isc_stats_t *gluecachestats;
dns_stats_t *rcvquerystats;
dns_stats_t *dnssecsignstats;
dns_stats_t *dnssecrefreshstats;
uint64_t nsstat_values[ns_statscounter_max];
uint64_t gluecachestats_values[dns_gluecachestatscounter_max];
@@ -2364,6 +2478,58 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
else
json_object_put(counters);
}
dnssecsignstats = dns_zone_getdnssecsignstats(zone);
if (dnssecsignstats != NULL) {
stats_dumparg_t dumparg;
json_object *counters = json_object_new_object();
CHECKMEM(counters);
dumparg.type = isc_statsformat_json;
dumparg.arg = counters;
dumparg.result = ISC_R_SUCCESS;
dns_dnssecsignstats_dump(dnssecsignstats,
dnssecsignstat_dump,
&dumparg, 0);
if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters);
goto error;
}
if (json_object_get_object(counters)->count != 0) {
json_object_object_add(zoneobj,
"dnssec-sign",
counters);
} else {
json_object_put(counters);
}
}
dnssecrefreshstats = dns_zone_getdnssecrefreshstats(zone);
if (dnssecrefreshstats != NULL) {
stats_dumparg_t dumparg;
json_object *counters = json_object_new_object();
CHECKMEM(counters);
dumparg.type = isc_statsformat_json;
dumparg.arg = counters;
dumparg.result = ISC_R_SUCCESS;
dns_dnssecsignstats_dump(dnssecrefreshstats,
dnssecsignstat_dump,
&dumparg, 0);
if (dumparg.result != ISC_R_SUCCESS) {
json_object_put(counters);
goto error;
}
if (json_object_get_object(counters)->count != 0) {
json_object_object_add(zoneobj,
"dnssec-refresh",
counters);
} else {
json_object_put(counters);
}
}
}
json_object_array_add(zonearray, zoneobj);
@@ -3098,7 +3264,7 @@ render_json_traffic(const char *url, isc_httpdurl_t *urlinfo,
freecb, freecb_args));
}
#endif /* HAVE_JSON */
#endif /* HAVE_JSON_C */
static isc_result_t
render_xsl(const char *url, isc_httpdurl_t *urlinfo,
@@ -3242,8 +3408,6 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
dns_acl_t *new_acl = NULL;
listener = isc_mem_get(server->mctx, sizeof(*listener));
if (listener == NULL)
return (ISC_R_NOMEMORY);
listener->httpdmgr = NULL;
listener->address = *addr;
@@ -3314,7 +3478,7 @@ add_listener(named_server_t *server, named_statschannel_t **listenerp,
isc_httpdmgr_addurl(listener->httpdmgr, "/xml/v3/traffic",
render_xml_traffic, server);
#endif
#ifdef HAVE_JSON
#ifdef HAVE_JSON_C
isc_httpdmgr_addurl(listener->httpdmgr, "/json",
render_json_all, server);
isc_httpdmgr_addurl(listener->httpdmgr, "/json/v1",
@@ -3449,12 +3613,12 @@ named_statschannels_configure(named_server_t *server, const cfg_obj_t *config,
"statistics-channels: XML library missing, "
"only JSON stats will be available");
#endif /* !HAVE_LIBXML2 */
#ifndef HAVE_JSON
#ifndef HAVE_JSON_C
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, ISC_LOG_WARNING,
"statistics-channels: JSON library missing, "
"only XML stats will be available");
#endif /* !HAVE_JSON */
#endif /* !HAVE_JSON_C */
#endif /* EXTENDED_STATS */
for (element = cfg_list_first(statschannellist);
-8
View File
@@ -84,10 +84,6 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
name = dns_fixedname_initname(&fname);
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
tctx->domain = isc_mem_get(mctx, sizeof(dns_name_t));
if (tctx->domain == NULL) {
result = ISC_R_NOMEMORY;
goto failure;
}
dns_name_init(tctx->domain, NULL);
RETERR(dns_name_dup(name, mctx, tctx->domain));
}
@@ -109,10 +105,6 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
if (result == ISC_R_SUCCESS) {
s = cfg_obj_asstring(obj);
tctx->gssapi_keytab = isc_mem_strdup(mctx, s);
if (tctx->gssapi_keytab == NULL) {
result = ISC_R_NOMEMORY;
goto failure;
}
}
*tctxp = tctx;
-4
View File
@@ -97,10 +97,6 @@ add_initial_keys(const cfg_obj_t *list, dns_tsig_keyring_t *ring,
secretstr = cfg_obj_asstring(secretobj);
secretalloc = secretlen = strlen(secretstr) * 3 / 4;
secret = isc_mem_get(mctx, secretlen);
if (secret == NULL) {
ret = ISC_R_NOMEMORY;
goto failure;
}
isc_buffer_init(&secretbuf, secret, secretlen);
ret = isc_base64_decodestring(secretstr, &secretbuf);
if (ret != ISC_R_SUCCESS)
+2 -1
View File
@@ -15,7 +15,8 @@ top_srcdir = @top_srcdir@
CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
${DNS_INCLUDES} ${ISC_INCLUDES} \
${OPENSSL_CFLAGS}
CDEFINES =
CWARNINGS =
-12
View File
@@ -230,25 +230,13 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
return (result);
cd = isc_mem_get(mctx, sizeof(*cd));
if (cd == NULL) {
isc_mem_destroy(&mctx);
return (ISC_R_NOMEMORY);
}
memset(cd, 0, sizeof(*cd));
cd->mctx = mctx;
cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]);
if (cd->dl_path == NULL) {
result = ISC_R_NOMEMORY;
goto failed;
}
cd->dlzname = isc_mem_strdup(cd->mctx, dlzname);
if (cd->dlzname == NULL) {
result = ISC_R_NOMEMORY;
goto failed;
}
/* Initialize the lock */
isc_mutex_init(&cd->lock);
-12
View File
@@ -227,25 +227,13 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
isc_mem_create(0, 0, &mctx);
cd = isc_mem_get(mctx, sizeof(*cd));
if (cd == NULL) {
isc_mem_destroy(&mctx);
return (ISC_R_NOMEMORY);
}
memset(cd, 0, sizeof(*cd));
cd->mctx = mctx;
cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]);
if (cd->dl_path == NULL) {
result = ISC_R_NOMEMORY;
goto failed;
}
cd->dlzname = isc_mem_strdup(cd->mctx, dlzname);
if (cd->dlzname == NULL) {
result = ISC_R_NOMEMORY;
goto failed;
}
triedload = true;
+20 -27
View File
@@ -287,10 +287,6 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
types = NULL;
else {
types = isc_mem_get(mctx, n * sizeof(dns_rdatatype_t));
if (types == NULL) {
result = ISC_R_NOMEMORY;
goto cleanup;
}
}
i = 0;
@@ -433,8 +429,6 @@ configure_staticstub_serveraddrs(const cfg_obj_t *zconfig, dns_zone_t *zone,
}
rdata = isc_mem_get(mctx, sizeof(*rdata) + region.length);
if (rdata == NULL)
return (ISC_R_NOMEMORY);
region.base = (unsigned char *)(rdata + 1);
memmove(region.base, &na.type, region.length);
dns_rdata_init(rdata);
@@ -455,13 +449,6 @@ configure_staticstub_serveraddrs(const cfg_obj_t *zconfig, dns_zone_t *zone,
/* Add to the list an apex NS with the ns name being the origin name */
dns_name_toregion(dns_zone_getorigin(zone), &sregion);
rdata = isc_mem_get(mctx, sizeof(*rdata) + sregion.length);
if (rdata == NULL) {
/*
* Already allocated data will be freed in the caller, so
* we can simply return here.
*/
return (ISC_R_NOMEMORY);
}
region.length = sregion.length;
region.base = (unsigned char *)(rdata + 1);
memmove(region.base, sregion.base, region.length);
@@ -523,8 +510,6 @@ configure_staticstub_servernames(const cfg_obj_t *zconfig, dns_zone_t *zone,
dns_name_toregion(nsname, &sregion);
rdata = isc_mem_get(mctx, sizeof(*rdata) + sregion.length);
if (rdata == NULL)
return (ISC_R_NOMEMORY);
region.length = sregion.length;
region.base = (unsigned char *)(rdata + 1);
memmove(region.base, sregion.base, region.length);
@@ -718,8 +703,6 @@ strtoargvsub(isc_mem_t *mctx, char *s, unsigned int *argcp,
/* We have reached the end of the string. */
*argcp = n;
*argvp = isc_mem_get(mctx, n * sizeof(char *));
if (*argvp == NULL)
return (ISC_R_NOMEMORY);
} else {
char *p = s;
while (*p != ' ' && *p != '\t' && *p != '\0')
@@ -904,6 +887,8 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
const dns_master_style_t *masterstyle = &dns_master_style_default;
isc_stats_t *zoneqrystats;
dns_stats_t *rcvquerystats;
dns_stats_t *dnssecsignstats;
dns_stats_t *dnssecrefreshstats;
dns_zonestat_level_t statlevel = dns_zonestat_none;
int seconds;
dns_zone_t *mayberaw = (raw != NULL) ? raw : zone;
@@ -978,8 +963,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
len = strlen(dlzname) + 5;
cpval = isc_mem_allocate(mctx, len);
if (cpval == NULL)
return (ISC_R_NOMEMORY);
snprintf(cpval, len, "dlz %s", dlzname);
}
@@ -994,12 +977,11 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
* cannot be promoted automatically to (const char * const *) by the
* compiler w/o generating a warning.
*/
result = dns_zone_setdbtype(zone, dbargc, (const char * const *)dbargv);
dns_zone_setdbtype(zone, dbargc, (const char * const *)dbargv);
isc_mem_put(mctx, dbargv, dbargc * sizeof(*dbargv));
if (cpval != default_dbtype && cpval != dlz_dbtype)
if (cpval != default_dbtype && cpval != dlz_dbtype) {
isc_mem_free(mctx, cpval);
if (result != ISC_R_SUCCESS)
return (result);
}
obj = NULL;
result = cfg_map_get(zoptions, "file", &obj);
@@ -1096,8 +1078,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
RETERR(dns_zone_setfile(raw, filename,
masterformat, masterstyle));
signedname = isc_mem_get(mctx, signedlen);
if (signedname == NULL)
return (ISC_R_NOMEMORY);
(void)snprintf(signedname, signedlen, "%s" SIGNED, filename);
result = dns_zone_setfile(zone, signedname,
@@ -1188,14 +1168,19 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
zoneqrystats = NULL;
rcvquerystats = NULL;
dnssecsignstats = NULL;
dnssecrefreshstats = NULL;
if (statlevel == dns_zonestat_full) {
RETERR(isc_stats_create(mctx, &zoneqrystats,
ns_statscounter_max));
RETERR(dns_rdatatypestats_create(mctx,
&rcvquerystats));
RETERR(dns_rdatatypestats_create(mctx, &rcvquerystats));
RETERR(dns_dnssecsignstats_create(mctx, &dnssecsignstats));
RETERR(dns_dnssecsignstats_create(mctx, &dnssecrefreshstats));
}
dns_zone_setrequeststats(zone, zoneqrystats);
dns_zone_setrcvquerystats(zone, rcvquerystats);
dns_zone_setdnssecsignstats(zone, dnssecsignstats);
dns_zone_setdnssecrefreshstats(zone, dnssecrefreshstats);
if (zoneqrystats != NULL)
isc_stats_detach(&zoneqrystats);
@@ -1203,6 +1188,14 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
if(rcvquerystats != NULL)
dns_stats_detach(&rcvquerystats);
if(dnssecsignstats != NULL) {
dns_stats_detach(&dnssecsignstats);
}
if(dnssecrefreshstats != NULL) {
dns_stats_detach(&dnssecrefreshstats);
}
/*
* Configure master functionality. This applies
* to primary masters (type "master") and slaves
+4 -4
View File
@@ -21,15 +21,15 @@ DST_GSSAPI_INC = @DST_GSSAPI_INC@
CINCLUDES = ${DNS_INCLUDES} ${BIND9_INCLUDES} ${ISC_INCLUDES} \
${ISCCFG_INCLUDES} ${IRS_INCLUDES} ${DST_GSSAPI_INC} \
@OPENSSL_INCLUDES@
${OPENSSL_CFLAGS}
CDEFINES = -DVERSION=\"${VERSION}\" @USE_GSSAPI@
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_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}
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
IRSLIBS = ../../lib/irs/libirs.@A@
+8 -32
View File
@@ -514,8 +514,6 @@ setup_keystr(void) {
secretlen = strlen(secretstr) * 3 / 4;
secret = isc_mem_allocate(gmctx, secretlen);
if (secret == NULL)
fatal("out of memory");
isc_buffer_init(&secretbuf, secret, secretlen);
result = isc_base64_decodestring(secretstr, &secretbuf);
@@ -584,8 +582,6 @@ read_sessionkey(isc_mem_t *mctx, isc_log_t *lctx) {
len = strlen(algorithm) + strlen(mykeyname) + strlen(secretstr) + 3;
keystr = isc_mem_allocate(mctx, len);
if (keystr == NULL)
fatal("out of memory");
snprintf(keystr, len, "%s:%s:%s", algorithm, mykeyname, secretstr);
setup_keystr();
@@ -824,9 +820,8 @@ setup_system(void) {
default_servers = !local_only;
ns_total = ns_alloc = (have_ipv4 ? 1 : 0) + (have_ipv6 ? 1 : 0);
servers = isc_mem_get(gmctx, ns_alloc * sizeof(isc_sockaddr_t));
if (servers == NULL)
fatal("out of memory");
servers = isc_mem_get(gmctx,
ns_alloc * sizeof(isc_sockaddr_t));
if (have_ipv6) {
memset(&in6, 0, sizeof(in6));
@@ -869,9 +864,8 @@ setup_system(void) {
}
ns_alloc = ns_total;
servers = isc_mem_get(gmctx, ns_alloc * sizeof(isc_sockaddr_t));
if (servers == NULL)
fatal("out of memory");
servers = isc_mem_get(gmctx,
ns_alloc * sizeof(isc_sockaddr_t));
i = 0;
for (sa = ISC_LIST_HEAD(*nslist);
@@ -1497,8 +1491,6 @@ evaluate_server(char *cmdline) {
ns_alloc = MAX_SERVERADDRS;
ns_inuse = 0;
servers = isc_mem_get(gmctx, ns_alloc * sizeof(isc_sockaddr_t));
if (servers == NULL)
fatal("out of memory");
memset(servers, 0, ns_alloc * sizeof(isc_sockaddr_t));
ns_total = get_addresses(server, (in_port_t)port, servers, ns_alloc);
@@ -1541,15 +1533,13 @@ evaluate_local(char *cmdline) {
if (have_ipv6 && inet_pton(AF_INET6, local, &in6) == 1) {
if (localaddr6 == NULL)
localaddr6 = isc_mem_get(gmctx, sizeof(isc_sockaddr_t));
if (localaddr6 == NULL)
fatal("out of memory");
localaddr6 = isc_mem_get(gmctx,
sizeof(isc_sockaddr_t));
isc_sockaddr_fromin6(localaddr6, &in6, (in_port_t)port);
} else if (have_ipv4 && inet_pton(AF_INET, local, &in4) == 1) {
if (localaddr4 == NULL)
localaddr4 = isc_mem_get(gmctx, sizeof(isc_sockaddr_t));
if (localaddr4 == NULL)
fatal("out of memory");
localaddr4 = isc_mem_get(gmctx,
sizeof(isc_sockaddr_t));
isc_sockaddr_fromin(localaddr4, &in4, (in_port_t)port);
} else {
fprintf(stderr, "invalid address %s", local);
@@ -1608,8 +1598,6 @@ evaluate_key(char *cmdline) {
}
secretlen = strlen(secretstr) * 3 / 4;
secret = isc_mem_allocate(gmctx, secretlen);
if (secret == NULL)
fatal("out of memory");
isc_buffer_init(&secretbuf, secret, secretlen);
result = isc_base64_decodestring(secretstr, &secretbuf);
@@ -1683,8 +1671,6 @@ evaluate_realm(char *cmdline) {
return (STATUS_SYNTAX);
}
realm = isc_mem_strdup(gmctx, buf);
if (realm == NULL)
fatal("out of memory");
return (STATUS_MORE);
#else
UNUSED(cmdline);
@@ -2520,8 +2506,6 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
ddebug("Destroying request [%p]", request);
dns_request_destroy(&request);
reqinfo = isc_mem_get(gmctx, sizeof(nsu_requestinfo_t));
if (reqinfo == NULL)
fatal("out of memory");
reqinfo->msg = soaquery;
reqinfo->addr = addr;
dns_message_renderreset(soaquery);
@@ -2659,8 +2643,6 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
master_alloc = MAX_SERVERADDRS;
size = master_alloc * sizeof(isc_sockaddr_t);
master_servers = isc_mem_get(gmctx, size);
if (master_servers == NULL)
fatal("out of memory");
memset(master_servers, 0, size);
master_total = get_addresses(serverstr, dnsport,
@@ -2724,8 +2706,6 @@ sendrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
isc_sockaddr_t *srcaddr;
reqinfo = isc_mem_get(gmctx, sizeof(nsu_requestinfo_t));
if (reqinfo == NULL)
fatal("out of memory");
reqinfo->msg = msg;
reqinfo->addr = destaddr;
@@ -2835,8 +2815,6 @@ start_gssrequest(dns_name_t *master) {
dns_name_format(master, namestr, sizeof(namestr));
if (kserver == NULL) {
kserver = isc_mem_get(gmctx, sizeof(isc_sockaddr_t));
if (kserver == NULL)
fatal("out of memory");
}
memmove(kserver, &master_servers[master_inuse],
@@ -2920,8 +2898,6 @@ send_gssrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
debug("send_gssrequest");
reqinfo = isc_mem_get(gmctx, sizeof(nsu_gssinfo_t));
if (reqinfo == NULL)
fatal("out of memory");
reqinfo->msg = msg;
reqinfo->addr = destaddr;
reqinfo->context = context;
+1 -1
View File
@@ -17,7 +17,7 @@ CINCLUDES = ${ISC_INCLUDES}
CDEFINES =
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
ISCDEPLIBS = ../../lib/isc/libisc.@A@
+2 -2
View File
@@ -17,9 +17,9 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
${NS_INCLUDES} ${DNS_INCLUDES} \
${ISCCFG_INCLUDES} ${ISC_INCLUDES}
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
NSLIBS = ../../lib/ns/libns.@A@
LIBS =
+2 -7
View File
@@ -43,12 +43,12 @@ dnssec-checkds \- DNSSEC delegation consistency checking tool
.SH "DESCRIPTION"
.PP
\fBdnssec\-checkds\fR
verifies the correctness of Delegation Signer (DS) or DNSSEC Lookaside Validation (DLV) resource records for keys in a specified zone\&.
verifies the correctness of Delegation Signer (DS) resource records for keys in a specified zone\&.
.SH "OPTIONS"
.PP
\-a \fIalgorithm\fR
.RS 4
Specify a digest algorithm to use when converting the zone\*(Aqs DNSKEY records to expected DS or DLV records\&. This option can be repeated, so that multiple records are checked for each DNSKEY record\&.
Specify a digest algorithm to use when converting the zone\*(Aqs DNSKEY records to expected DS records\&. This option can be repeated, so that multiple records are checked for each DNSKEY record\&.
.sp
The
\fIalgorithm\fR
@@ -62,11 +62,6 @@ If a
is specified, then the zone is read from that file to find the DNSKEY records\&. If not, then the DNSKEY records for the zone are looked up in the DNS\&.
.RE
.PP
\-l \fIdomain\fR
.RS 4
Check for a DLV record in the specified lookaside domain, instead of checking for a DS record in the zone\*(Aqs parent\&.
.RE
.PP
\-s \fIfile\fR
.RS 4
Specifies a prepared dsset file, such as would be generated by
+3 -14
View File
@@ -59,9 +59,8 @@
<refsection><info><title>DESCRIPTION</title></info>
<para><command>dnssec-checkds</command>
verifies the correctness of Delegation Signer (DS) or DNSSEC
Lookaside Validation (DLV) resource records for keys in a specified
zone.
verifies the correctness of Delegation Signer (DS)
resource records for keys in a specified zone.
</para>
</refsection>
@@ -74,7 +73,7 @@
<listitem>
<para>
Specify a digest algorithm to use when converting the
zone's DNSKEY records to expected DS or DLV records. This
zone's DNSKEY records to expected DS records. This
option can be repeated, so that multiple records are
checked for each DNSKEY record.
</para>
@@ -98,16 +97,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-l <replaceable class="parameter">domain</replaceable></term>
<listitem>
<para>
Check for a DLV record in the specified lookaside domain,
instead of checking for a DS record in the zone's parent.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">file</replaceable></term>
<listitem>
+3 -11
View File
@@ -46,9 +46,8 @@
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
<p><span class="command"><strong>dnssec-checkds</strong></span>
verifies the correctness of Delegation Signer (DS) or DNSSEC
Lookaside Validation (DLV) resource records for keys in a specified
zone.
verifies the correctness of Delegation Signer (DS)
resource records for keys in a specified zone.
</p>
</div>
@@ -60,7 +59,7 @@
<dd>
<p>
Specify a digest algorithm to use when converting the
zone's DNSKEY records to expected DS or DLV records. This
zone's DNSKEY records to expected DS records. This
option can be repeated, so that multiple records are
checked for each DNSKEY record.
</p>
@@ -79,13 +78,6 @@
then the DNSKEY records for the zone are looked up in the DNS.
</p>
</dd>
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
<dd>
<p>
Check for a DLV record in the specified lookaside domain,
instead of checking for a DS record in the zone's parent.
</p>
</dd>
<dt><span class="term">-s <em class="replaceable"><code>file</code></em></span></dt>
<dd>
<p>
+9 -33
View File
@@ -21,7 +21,7 @@ prog = 'dnssec-checkds'
############################################################################
# SECRR class:
# Class for DS/DLV resource record
# Class for DS resource record
############################################################################
class SECRR:
hashalgs = {1: 'SHA-1', 2: 'SHA-256', 3: 'GOST', 4: 'SHA-384'}
@@ -33,7 +33,7 @@ class SECRR:
digest = ''
ttl = 0
def __init__(self, rrtext, dlvname = None):
def __init__(self, rrtext):
if not rrtext:
raise Exception
@@ -45,24 +45,8 @@ class SECRR:
if len(fields) < 7:
raise Exception
if dlvname:
self.rrtype = "DLV"
self.dlvname = dlvname.lower()
parent = fields[0].lower().strip('.').split('.')
parent.reverse()
dlv = dlvname.split('.')
dlv.reverse()
while len(dlv) != 0 and len(parent) != 0 and parent[0] == dlv[0]:
parent = parent[1:]
dlv = dlv[1:]
if dlv:
raise Exception
parent.reverse()
self.parent = '.'.join(parent)
self.rrname = self.parent + '.' + self.dlvname + '.'
else:
self.rrtype = "DS"
self.rrname = fields[0].lower()
self.rrtype = "DS"
self.rrname = fields[0].lower()
fields = fields[1:]
if fields[0].upper() in ['IN', 'CH', 'HS']:
@@ -91,9 +75,9 @@ class SECRR:
############################################################################
# check:
# Fetch DS/DLV RRset for the given zone from the DNS; fetch DNSKEY
# Fetch DS RRset for the given zone from the DNS; fetch DNSKEY
# RRset from the masterfile if specified, or from DNS if not.
# Generate a set of expected DS/DLV records from the DNSKEY RRset,
# Generate a set of expected DS records from the DNSKEY RRset,
# and report on congruency.
############################################################################
def check(zone, args):
@@ -101,15 +85,13 @@ def check(zone, args):
if args.dssetfile:
fp = open(args.dssetfile).read()
else:
cmd = [args.dig, "+noall", "+answer", "-t",
"dlv" if args.lookaside else "ds", "-q",
zone + "." + args.lookaside if args.lookaside else zone]
cmd = [args.dig, "+noall", "+answer", "-t", "ds", "-q", zone]
fp, _ = Popen(cmd, stdout=PIPE).communicate()
for line in fp.splitlines():
if type(line) is not str:
line = line.decode('ascii')
rrlist.append(SECRR(line, args.lookaside))
rrlist.append(SECRR(line))
rrlist = sorted(rrlist, key=lambda rr: (rr.keyid, rr.keyalg, rr.hashalg))
klist = []
@@ -117,8 +99,6 @@ def check(zone, args):
cmd = [args.dsfromkey]
for algo in args.algo:
cmd += ['-a', algo]
if args.lookaside:
cmd += ["-l", args.lookaside]
if args.masterfile:
cmd += ["-f", args.masterfile, zone]
@@ -132,7 +112,7 @@ def check(zone, args):
for line in fp.splitlines():
if type(line) is not str:
line = line.decode('ascii')
klist.append(SECRR(line, args.lookaside))
klist.append(SECRR(line))
if len(klist) < 1:
print("No DNSKEY records found in zone apex")
@@ -182,8 +162,6 @@ def parse_args():
type=str, help='path to \'dnssec-dsfromkey\'')
parser.add_argument('-f', '--file', dest='masterfile', type=str,
help='zone master file')
parser.add_argument('-l', '--lookaside', dest='lookaside', type=str,
help='DLV lookaside zone')
parser.add_argument('-s', '--dsset', dest='dssetfile', type=str,
help='prepared DSset file')
parser.add_argument('-v', '--version', action='version',
@@ -191,8 +169,6 @@ def parse_args():
args = parser.parse_args()
args.zone = args.zone.strip('.')
if args.lookaside:
args.lookaside = args.lookaside.strip('.')
return args
+3 -3
View File
@@ -23,9 +23,9 @@ CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @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@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
+8 -8
View File
@@ -284,7 +284,7 @@ maintain, and also requires the zone to be configured to allow dynamic DNS\&. (S
.PP
\fBmanaged\-keys \fR\fB\fI(status | refresh | sync | destroy)\fR\fR\fB \fR\fB[\fIclass\fR [\fIview\fR]]\fR
.RS 4
Inspect and control the "managed\-keys" database which handles RFC 5011 DNSSEC trust anchor maintenance\&. If a view is specified, these commands are applied to that view; otherwise they are applied to all views\&.
Inspect and control the "managed keys" database which handles RFC 5011 DNSSEC trust anchor maintenance\&. If a view is specified, these commands are applied to that view; otherwise they are applied to all views\&.
.sp
.RS 4
.ie n \{\
@@ -296,7 +296,7 @@ Inspect and control the "managed\-keys" database which handles RFC 5011 DNSSEC t
.\}
When run with the
status
keyword, prints the current status of the managed\-keys database\&.
keyword, prints the current status of the managed keys database\&.
.RE
.sp
.RS 4
@@ -309,7 +309,7 @@ keyword, prints the current status of the managed\-keys database\&.
.\}
When run with the
refresh
keyword, forces an immediate refresh query to be sent for all the managed keys, updating the managed\-keys database if any new keys are found, without waiting the normal refresh interval\&.
keyword, forces an immediate refresh query to be sent for all the managed keys, updating the managed keys database if any new keys are found, without waiting the normal refresh interval\&.
.RE
.sp
.RS 4
@@ -322,7 +322,7 @@ keyword, forces an immediate refresh query to be sent for all the managed keys,
.\}
When run with the
sync
keyword, forces an immediate dump of the managed\-keys database to disk (in the file
keyword, forces an immediate dump of the managed keys database to disk (in the file
managed\-keys\&.bind
or (\fIviewname\fR\&.mkeys)\&. This synchronizes the database with its journal file, so that the database\*(Aqs current contents can be inspected visually\&.
.RE
@@ -337,7 +337,7 @@ or (\fIviewname\fR\&.mkeys)\&. This synchronizes the database with its journal f
.\}
When run with the
destroy
keyword, the managed\-keys database is shut down and deleted, and all key maintenance is terminated\&. This command should be used only with extreme caution\&.
keyword, the managed keys database is shut down and deleted, and all key maintenance is terminated\&. This command should be used only with extreme caution\&.
.sp
Existing keys that are already trusted are not deleted from memory; DNSSEC validation can continue after this command is used\&. However, key maintenance operations will cease until
\fBnamed\fR
@@ -515,8 +515,8 @@ timer\&.
\fBsecroots \fR\fB[\-]\fR\fB \fR\fB[\fIview \&.\&.\&.\fR]\fR
.RS 4
Dump the security roots (i\&.e\&., trust anchors configured via
\fBtrusted\-keys\fR,
\fBmanaged\-keys\fR, or
\fBdnssec\-keys\fR
statements, or the managed\-keys or trusted\-keys statements (both deprecated), or via
\fBdnssec\-validation auto\fR) and negative trust anchors for the specified views\&. If no view is specified, all views are dumped\&. Security roots will indicate whether they are configured as trusted keys, managed keys, or initializing managed keys (managed keys that have not yet been updated by a successful key refresh query)\&.
.sp
If the first argument is "\-", then the output is returned via the
@@ -697,7 +697,7 @@ Delete a given TKEY\-negotiated key from the server\&. (This does not apply to s
.RS 4
List the names of all TSIG keys currently configured for use by
\fBnamed\fR
in each view\&. The list both statically configured keys and dynamic TKEY\-negotiated keys\&.
in each view\&. The list includes both statically configured keys and dynamic TKEY\-negotiated keys\&.
.RE
.PP
\fBvalidation ( on | off | status ) \fR\fB[\fIview \&.\&.\&.\fR]\fR\fB \fR
+2 -4
View File
@@ -278,7 +278,7 @@ rndc_senddone(isc_task_t *task, isc_event_t *event) {
if (sends == 0 && recvs == 0) {
isc_socket_detach(&sock);
isc_task_shutdown(task);
RUNTIME_CHECK(isc_app_shutdown() == ISC_R_SUCCESS);
isc_app_shutdown();
}
}
@@ -347,7 +347,7 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) {
if (sends == 0 && recvs == 0) {
isc_socket_detach(&sock);
isc_task_shutdown(task);
RUNTIME_CHECK(isc_app_shutdown() == ISC_R_SUCCESS);
isc_app_shutdown();
}
}
@@ -968,8 +968,6 @@ main(int argc, char **argv) {
argslen += strlen(argv[i]) + 1;
args = isc_mem_get(rndc_mctx, argslen);
if (args == NULL)
DO("isc_mem_get", ISC_R_NOMEMORY);
p = args;
for (i = 0; i < argc; i++) {
+9 -9
View File
@@ -458,7 +458,7 @@
<term><userinput>managed-keys <replaceable>(status | refresh | sync | destroy)</replaceable> <optional><replaceable>class</replaceable> <optional><replaceable>view</replaceable></optional></optional></userinput></term>
<listitem>
<para>
Inspect and control the "managed-keys" database which
Inspect and control the "managed keys" database which
handles RFC 5011 DNSSEC trust anchor maintenance. If a view
is specified, these commands are applied to that view;
otherwise they are applied to all views.
@@ -467,14 +467,14 @@
<listitem>
<para>
When run with the <literal>status</literal> keyword, prints
the current status of the managed-keys database.
the current status of the managed keys database.
</para>
</listitem>
<listitem>
<para>
When run with the <literal>refresh</literal> keyword,
forces an immediate refresh query to be sent for all
the managed keys, updating the managed-keys database
the managed keys, updating the managed keys database
if any new keys are found, without waiting the normal
refresh interval.
</para>
@@ -482,7 +482,7 @@
<listitem>
<para>
When run with the <literal>sync</literal> keyword, forces an
immediate dump of the managed-keys database to disk
immediate dump of the managed keys database to disk
(in the file <filename>managed-keys.bind</filename> or
(<filename><replaceable>viewname</replaceable>.mkeys</filename>).
This synchronizes the database with its journal file, so
@@ -493,7 +493,7 @@
<listitem>
<para>
When run with the <literal>destroy</literal> keyword, the
managed-keys database is shut down and deleted, and all key
managed keys database is shut down and deleted, and all key
maintenance is terminated. This command should be used only
with extreme caution.
</para>
@@ -772,9 +772,9 @@
<listitem>
<para>
Dump the security roots (i.e., trust anchors
configured via <command>trusted-keys</command>,
<command>managed-keys</command>, or
<command>dnssec-validation auto</command>) and negative trust
configured via <command>dnssec-keys</command> statements, or the
managed-keys or trusted-keys statements (both deprecated), or
via <command>dnssec-validation auto</command>) and negative trust
anchors for the specified views. If no view is specified, all
views are dumped. Security roots will indicate whether
they are configured as trusted keys, managed keys, or
@@ -1066,7 +1066,7 @@
<para>
List the names of all TSIG keys currently configured
for use by <command>named</command> in each view. The
list both statically configured keys and dynamic
list includes both statically configured keys and dynamic
TKEY-negotiated keys.
</para>
</listitem>
+9 -9
View File
@@ -378,7 +378,7 @@
<dt><span class="term"><strong class="userinput"><code>managed-keys <em class="replaceable"><code>(status | refresh | sync | destroy)</code></em> [<span class="optional"><em class="replaceable"><code>class</code></em> [<span class="optional"><em class="replaceable"><code>view</code></em></span>]</span>]</code></strong></span></dt>
<dd>
<p>
Inspect and control the "managed-keys" database which
Inspect and control the "managed keys" database which
handles RFC 5011 DNSSEC trust anchor maintenance. If a view
is specified, these commands are applied to that view;
otherwise they are applied to all views.
@@ -387,14 +387,14 @@
<li class="listitem">
<p>
When run with the <code class="literal">status</code> keyword, prints
the current status of the managed-keys database.
the current status of the managed keys database.
</p>
</li>
<li class="listitem">
<p>
When run with the <code class="literal">refresh</code> keyword,
forces an immediate refresh query to be sent for all
the managed keys, updating the managed-keys database
the managed keys, updating the managed keys database
if any new keys are found, without waiting the normal
refresh interval.
</p>
@@ -402,7 +402,7 @@
<li class="listitem">
<p>
When run with the <code class="literal">sync</code> keyword, forces an
immediate dump of the managed-keys database to disk
immediate dump of the managed keys database to disk
(in the file <code class="filename">managed-keys.bind</code> or
(<code class="filename"><em class="replaceable"><code>viewname</code></em>.mkeys</code>).
This synchronizes the database with its journal file, so
@@ -413,7 +413,7 @@
<li class="listitem">
<p>
When run with the <code class="literal">destroy</code> keyword, the
managed-keys database is shut down and deleted, and all key
managed keys database is shut down and deleted, and all key
maintenance is terminated. This command should be used only
with extreme caution.
</p>
@@ -653,9 +653,9 @@
<dd>
<p>
Dump the security roots (i.e., trust anchors
configured via <span class="command"><strong>trusted-keys</strong></span>,
<span class="command"><strong>managed-keys</strong></span>, or
<span class="command"><strong>dnssec-validation auto</strong></span>) and negative trust
configured via <span class="command"><strong>dnssec-keys</strong></span> statements, or the
managed-keys or trusted-keys statements (both deprecated), or
via <span class="command"><strong>dnssec-validation auto</strong></span>) and negative trust
anchors for the specified views. If no view is specified, all
views are dumped. Security roots will indicate whether
they are configured as trusted keys, managed keys, or
@@ -905,7 +905,7 @@
<p>
List the names of all TSIG keys currently configured
for use by <span class="command"><strong>named</strong></span> in each view. The
list both statically configured keys and dynamic
list includes both statically configured keys and dynamic
TKEY-negotiated keys.
</p>
</dd>
+4 -4
View File
@@ -14,15 +14,15 @@ top_srcdir = @top_srcdir@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \
@OPENSSL_INCLUDES@
${OPENSSL_CFLAGS}
CDEFINES =
CWARNINGS =
BACKTRACECFLAGS = @BACKTRACECFLAGS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
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}
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
+10 -5
View File
@@ -49,7 +49,8 @@ output(void *closure, const char *text, int textlen) {
static void
usage(void) {
fprintf(stderr, "usage: cfg_test --rndc|--named "
"[--grammar] [--memstats] conffile\n");
"[--grammar] [--zonegrammar] [--active] "
"[--memstats] conffile\n");
exit(1);
}
@@ -67,6 +68,7 @@ main(int argc, char **argv) {
bool memstats = false;
char *filename = NULL;
unsigned int zonetype = 0;
unsigned int pflags = 0;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
@@ -98,7 +100,9 @@ main(int argc, char **argv) {
usage();
while (argc > 1) {
if (strcmp(argv[1], "--grammar") == 0) {
if (strcmp(argv[1], "--active") == 0) {
pflags |= CFG_PRINTER_ACTIVEONLY;
} else if (strcmp(argv[1], "--grammar") == 0) {
grammar = true;
} else if (strcmp(argv[1], "--zonegrammar") == 0) {
argv++, argc--;
@@ -149,13 +153,14 @@ main(int argc, char **argv) {
if (grammar) {
if (type == NULL)
usage();
cfg_print_grammar(type, output, NULL);
cfg_print_grammar(type, pflags, output, NULL);
} else if (zonetype != 0) {
cfg_print_zonegrammar(zonetype, output, NULL);
cfg_print_zonegrammar(zonetype, pflags, output, NULL);
} else {
if (type == NULL || filename == NULL)
usage();
RUNTIME_CHECK(cfg_parser_create(mctx, lctx, &pctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(cfg_parser_create(mctx, lctx, &pctx) ==
ISC_R_SUCCESS);
result = cfg_parse_file(pctx, filename, type, &cfg);
+4 -6
View File
@@ -174,7 +174,6 @@ options {
files 230;
max-cache-size 1m;
stacksize 231;
cleaning-interval 1000;
heartbeat-interval 1001;
interface-interval 1002;
statistics-interval 1003;
@@ -260,8 +259,8 @@ key "non-viewkey" { secret "YWFh" ; algorithm "zzz" ; };
view "test-view" in {
key "viewkey" { algorithm "xxx" ; secret "eXl5" ; };
also-notify { 10.2.2.3; };
trusted-keys {
foo.com. 4 3 2 "abdefghijklmnopqrstuvwxyz";
managed-keys {
foo.com. static 4 3 2 "abdefghijklmnopqrstuvwxyz";
};
sig-validity-interval 45;
max-cache-size 100000;
@@ -285,7 +284,6 @@ view "test-view" in {
query-source-v6 address 6:6:6:6:6:6:6:6 port *;
max-transfer-time-out 45;
max-transfer-idle-out 55;
cleaning-interval 100;
min-roots 3;
lame-ttl 477;
max-ncache-ttl 333;
@@ -344,8 +342,8 @@ zone "." {
// pubkey 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
};
trusted-keys {
"." 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
managed-keys {
"." static 257 255 1 "AQP2fHpZ4VMpKo/jc9Fod821uyfY5p8j5h/Am0V/KpBTMZjdXmp9QJe6yFRoIIzkaNCgTIftASdpXGgCwFB2j2KXP/rick6gvEer5VcDEkLR5Q==";
};

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