Compare commits

...

1544 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 Andrews
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 Hunt
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 Mekking
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 Trofimovich
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 Andrews
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 Hunt
664b8f04f5 add -q to getopt flags, and use newlines consistently with report() 2019-07-31 10:05:52 +02:00
Evan Hunt
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 Andrews
12d9681442 add CHANGES 2019-07-30 16:21:49 -07:00
Mark Andrews
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 Andrews
b8a96bfa78 add CHANGES 2019-07-25 08:03:10 -04:00
Mark Andrews
570d1cf0bb use h?+script selectors 2019-07-25 08:03:10 -04:00
Mark Andrews
e6c13ebb26 toggle graph/counter pairs 2019-07-25 08:03:10 -04:00
Mark Andrews
34ce90565c toggle graph/counter pairs 2019-07-25 08:03:10 -04:00
Timothe Litt
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 Hunt
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 Finch
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ń
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 Hunt
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ń
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ęcicki
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ý
81faafd508 lib/ns/stats.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej Surý
0471d1c1ce lib/isc/win32/socket.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej Surý
c0511688b5 lib/isc/task.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej Surý
f1471bc2e1 lib/isc/stats.c: Use ->references instead of ->refs 2019-07-09 16:11:14 +02:00
Ondřej Surý
cbe8034dc8 lib/isc/quota.c: use proper acquire/release/relaxed memory order semantics 2019-07-09 16:11:14 +02:00
Ondřej Surý
244ac0601f lib/isc/counter.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej Surý
81550c67da lib/dns/zt.c: use isc_refcount_t and atomics 2019-07-09 16:11:14 +02:00
Ondřej Surý
3c30d095c4 lib/dns/tsig.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej Surý
2a57d0b00c lib/dns/ssu.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej Surý
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ý
f3577e4635 lib/dns/sdb.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej Surý
9da902a201 lib/dns/resolver.c: use isc_refcount_t and atomics 2019-07-09 16:09:36 +02:00
Ondřej Surý
6622c7a70a lib/dns/masterdump.c: use isc_refcount_t and atomics 2019-07-09 16:09:36 +02:00
Ondřej Surý
1097a209e1 lib/dns/master.c: use isc_refcount_t and atomics 2019-07-09 16:09:36 +02:00
Ondřej Surý
8a128151f9 lib/dns/lib.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej Surý
3dece71b91 lib/dns/nta.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej Surý
f5d3250d90 lib/dns/ecdb.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej Surý
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ý
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 Jach
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 Hunt
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ý
00807c03af Protect global init_count variable in rbtdb.c by making it atomic 2019-07-03 00:05:34 -04:00
Ondř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ý
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 Andrews
7c95192691 Define ATOMIC_VAR_INIT in isc/stdatomic.h shim 2019-07-03 00:05:34 -04:00
Ondř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ý
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 Hunt
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 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ý
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 Andrews
f8b3aa97df add CHANGES 2019-06-26 14:03:53 -07:00
Mark Andrews
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 Andrews
eaba8dd799 remove 'Configured Zones'; add even/odd to zone list 2019-06-26 13:31:58 -07:00
Timothe Litt
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 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 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 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 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 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 Andrews
42173037ee add CHANGES 2019-06-24 11:50:30 -07:00
Tony Finch
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ń
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ń
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 Conry
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 Finch
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 User
14ea08c759 Merge branch 'prep-release' into security-master 2019-06-19 15:36:30 -07:00
Tinderbox User
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 Andrews
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ęcicki
c62a7c88b8 CHANGES note 2019-06-13 13:35:44 +10:00
Witold Kręcicki
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ęcicki
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ý
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 Morris
d47c1d5dd0 Tweak paragraph style in release notes PDF 2019-06-07 08:37:22 +02:00
Stephen Morris
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ý
d45f9e413f Enforce pthread rwlock to be only enabled in developer mode 2019-06-05 11:17:19 -07:00
Ondřej Surý
ac3d9b97a3 Fix Windows build by moving #include <pthread.h> to correct #ifdef block 2019-06-05 11:17:19 -07:00
Ondřej Surý
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 Finch
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ý
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ý
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ý
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ý
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ý
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 Hunt
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 Andrews
2846465719 add RFC6944 2019-05-31 16:17:30 -07:00
Mark Andrews
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ęcicki
e56d95847b CHANGES 2019-05-31 11:22:08 -07:00
Witold Kręcicki
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ęcicki
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ęcicki
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ęcicki
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
Ondřej Surý
e02228125e Merge branch 'ondrej/add-all-isc-atomic-defines' into 'master'
Add most useful relaxed and acquire-relase stdatomic convenience macros

See merge request isc-projects/bind9!1935
2019-05-13 03:03:17 -04:00
Ondřej Surý
ab389695b0 Add most useful relaxed and acquire-relase stdatomic convenience macros
The header file <isc/atomic.h> now contains convenience macros for
most useful explicit memory ordering for C11 stdatomics, only relaxed
and acquire-release semantics is being used.  These macros SHOULD be
used instead of atomic_<func>_explicit functions.
2019-05-13 12:17:21 +07:00
Ondřej Surý
976d62aa23 Merge branch '899-remove-unspec' into 'master'
Remove UNSPEC rrtype

Closes #899

See merge request isc-projects/bind9!1931
2019-05-12 23:51:14 -04:00
Witold Kręcicki
a8e2ca6f7d Remove UNSPEC rrtype 2019-05-13 10:05:03 +07:00
Mark Andrews
de49b26eb0 Merge branch '981-armv5-build-is-broken' into 'master'
Resolve "armv5 build is broken"

Closes #981

See merge request isc-projects/bind9!1892
2019-05-12 21:51:21 -04:00
Mark Andrews
f546769b8b arm: just use the compiler's default yield support 2019-05-12 21:39:43 -04:00
Mark Andrews
9150e432aa Merge branch '984-remove-dead-code-in-pkcs11-keygen-c' into 'master'
Resolve "Remove dead code in pkcs11-keygen.c"

Closes #984

See merge request isc-projects/bind9!1814
2019-05-12 21:38:58 -04:00
Mark Andrews
2e4986e2c4 remove dead code and unnecessary call to pkcs_C_GetAttributeValue 2019-05-13 11:21:09 +10:00
Ondřej Surý
3ee94d7845 Merge branch '713-mem-benchmark' into 'master'
Add benchmark for isc_{mem,mempool}_{get,put} operations

Closes #713

See merge request isc-projects/bind9!1928
2019-05-10 17:20:26 -04:00
Ondřej Surý
7ec9502ec5 Add benchmark for isc_{mem,mempool}_{get,put} operations 2019-05-11 04:02:35 +07:00
Tinderbox User
031bca512d Merge branch 'prep-release' 2019-05-10 04:39:56 +00:00
Tinderbox User
25e416fb67 prep 9.15.0 2019-05-10 04:39:43 +00:00
Evan Hunt
07218e08ce Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1923
2019-05-09 23:59:54 -04:00
Evan Hunt
6e236fbaf1 add a placeholder that was missed earlier; update subsequent change numbers 2019-05-09 20:58:27 -07:00
Evan Hunt
2f17238f94 Merge branch '997-make-ntas-work-with-validating-forwarders' into 'master'
Make NTAs work with validating forwarders

Closes #997

See merge request isc-projects/bind9!1859
2019-05-09 23:12:10 -04:00
Michał Kępień
5be7c6f4b3 Add CHANGES entry
5219.	[bug]		Negative trust anchors did not work with "forward only;"
			to validating resolvers. [GL #997]
2019-05-09 19:55:36 -07:00
Michał Kępień
5e80488270 Make NTAs work with validating forwarders
If named is configured to perform DNSSEC validation and also forwards
all queries ("forward only;") to validating resolvers, negative trust
anchors do not work properly because the CD bit is not set in queries
sent to the forwarders.  As a result, instead of retrieving bogus DNSSEC
material and making validation decisions based on its configuration,
named is only receiving SERVFAIL responses to queries for bogus data.
Fix by ensuring the CD bit is always set in queries sent to forwarders
if the query name is covered by an NTA.
2019-05-09 19:55:35 -07:00
Evan Hunt
7d1a7c46f5 Merge branch '958-improve-message-about-python-ply' into 'master'
Improve the error message about missing PLY Python package

Closes #958

See merge request isc-projects/bind9!1918
2019-05-09 22:50:54 -04:00
Ondřej Surý
55b48700da Improve the error message about missing PLY Python package
Previously, only a message about missing Python was printed, which was
misleading to many users.  The new message clearly states that Python
AND PLY is required and prints basic instructions how to install PLY
package.
2019-05-09 19:40:13 -07:00
Ondřej Surý
913f246307 Merge branch 'ondrej/reproducible-build' into 'master'
Make lib/dns/gen.c compatible with reproducible builds.

See merge request isc-projects/bind9!1758
2019-05-09 04:24:35 -04:00
Ondřej Surý
c8cb612d39 Make lib/dns/gen.c compatible with reproducible builds.
The gen.c will now use SOURCE_DATE_EPOCH[1] if found in environment
to make the build more reproducible build friendly.

1. https://reproducible-builds.org/specs/source-date-epoch/
2019-05-09 15:10:01 +07:00
Mark Andrews
f23fa0a3e5 Merge branch '960-add-edns-client-tag-and-edns-server-tag' into 'master'
Resolve "Add EDNS Client Tag and EDNS Server Tag"

Closes #960

See merge request isc-projects/bind9!1754
2019-05-09 03:55:38 -04:00
Mark Andrews
ee7cf180b3 Recognise EDNS Client Tag and EDNS Server Tag 2019-05-09 17:29:23 +10:00
Evan Hunt
a157e0ac04 Merge branch '1015-ds-sha-1-deprecation' into 'master'
Deprecate SHA-1 hash in DS/CDS

Closes #1015

See merge request isc-projects/bind9!1908
2019-05-08 21:32:27 -04:00
Tony Finch
793d358cd6 add CHANGES and release note 2019-05-08 18:18:07 -07:00
Tony Finch
8785f6fa34 Deprecate SHA-1 CDS records
This affects CDS records generated by `named` and `dnssec-signzone`
based on `-P sync` and `-D sync` key timing instructions.

This is for conformance with the DS/CDS algorithm requirements in
https://tools.ietf.org/html/draft-ietf-dnsop-algorithm-update
2019-05-08 18:17:55 -07:00
Tony Finch
d8f2eb249a Deprecate SHA-1 DS digests in dnssec-signzone
This affects two cases:

  * When writing a `dsset` file for this zone, to be used by its
    parent, only write a SHA-256 DS record.

  * When reading a `keyset` file for a child, to generate DS records
    to include in this zone, generate SHA-256 DS records only.

This change does not affect digests used in CDS records.

This is for conformance with the DS/CDS algorithm requirements in
https://tools.ietf.org/html/draft-ietf-dnsop-algorithm-update
2019-05-08 18:17:55 -07:00
Tony Finch
129b731273 Deprecate SHA-1 in dnssec-checkds
This changes the behaviour so that it explicitly lists DS records that
are present in the parent but do not have keys in the child. Any
inconsistency is reported as an error, which is somewhat stricter than
before.

This is for conformance with the DS/CDS algorithm requirements in
https://tools.ietf.org/html/draft-ietf-dnsop-algorithm-update
2019-05-08 18:17:55 -07:00
Tony Finch
796a6c4e4e Deprecate SHA-1 in dnssec-dsfromkey
This makes the `-12a` options to `dnssec-dsfromkey` work more like
`dnssec-cds`, in that you can specify more than one digest and you
will get multiple records. (Previously you could only get one
non-default digest type at a time.)

The default is now `-2`. You can get the old behaviour with `-12`.

Tests and tools that use `dnssec-dsfromkey` have been updated to use
`-12` where necessary.

This is for conformance with the DS/CDS algorithm requirements in
https://tools.ietf.org/html/draft-ietf-dnsop-algorithm-update
2019-05-08 18:17:55 -07:00
Tony Finch
a177b07da1 bin/dnssec: move a little boilerplate into shared code 2019-05-08 18:17:55 -07:00
Mark Andrews
42ed7e43dc tests/resolver: look for hash algorithm 2 (SHA-256) now 2019-05-08 18:17:55 -07:00
Mark Andrews
ce6ecde3f3 Merge branch '899-totext-fromtext-fuzz' into 'master'
fuzz dns_rdata_fromwire

See merge request isc-projects/bind9!1582
2019-05-08 20:41:57 -04:00
Mark Andrews
8ffdf6759e dns_rdata_fromwire_text fuzzer
Fuzz input to dns_rdata_fromwire(). Then convert the result
to text, back to wire format, to multiline text, and back to wire
format again, checking for consistency throughout the sequence.
2019-05-08 20:30:40 -04:00
Mark Andrews
8fd8b9fd26 Merge branch '852-bind-returning-malformed-packet-error-when-sshfp-record-has-fingerprint-value-less-than-4-characters' into 'master'
Resolve "Bind returning malformed packet error when sshfp record has fingerprint value less than 4 characters"

Closes #852

See merge request isc-projects/bind9!1445
2019-05-08 18:42:56 -04:00
Mark Andrews
1722728c80 enforce known SSHFP finger print lengths 2019-05-09 08:11:43 +10:00
Evan Hunt
be5d4cadfc Merge branch '868-fix-trusted-keys-handling-with-dnssec-validation-auto' into 'master'
fix incorrect behavior mixing trusted-keys with validation auto

Closes #868

See merge request isc-projects/bind9!1483
2019-05-08 14:38:52 -04:00
Evan Hunt
cdc4388ac3 CHANGES, release notes 2019-05-07 22:06:31 -07:00
Evan Hunt
37e79bd79c reject the use of trusted-keys and managed-keys for the same name 2019-05-07 22:02:37 -07:00
Evan Hunt
8a8cd19eb0 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1903
2019-05-07 22:40:34 -04:00
Evan Hunt
2163a59d0d placeholder 2019-05-07 19:39:39 -07:00
Evan Hunt
cfee8b1492 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1902
2019-05-07 01:20:50 -04:00
Evan Hunt
bd14aa6d8e placeholder 2019-05-06 22:19:48 -07:00
Mark Andrews
f4bb54befb Merge branch '765-allow-dig-to-print-aaaa-records-fully-expanded' into 'master'
Resolve "Allow dig to print AAAA records fully expanded."

Closes #765

See merge request isc-projects/bind9!1188
2019-05-07 01:06:18 -04:00
Mark Andrews
fb0b8f9bd7 add CHANGES 2019-05-06 21:50:56 -07:00
Mark Andrews
d8798098e8 support printing AAAA in expanded form 2019-05-06 21:50:38 -07:00
Mark Andrews
6bb57c776e Merge branch '991-provide-ixfr-should-only-be-tests-on-tcp-clients' into 'master'
Resolve "provide-ixfr should only be tested on TCP clients."

Closes #991

See merge request isc-projects/bind9!1846
2019-05-06 23:23:37 -04:00
Mark Andrews
ba1d7f3a07 add CHANGES 2019-05-07 13:00:55 +10:00
Mark Andrews
d547465af5 add test for 'provide-ixfr no;' ; add forensics support 2019-05-07 12:59:35 +10:00
Mark Andrews
18c49853e3 only test provideixfr if the transport is TCP 2019-05-07 12:59:35 +10:00
Mark Andrews
b958a13c37 Merge branch '1005-filter-aaaa-crash-in-9-14-1' into 'master'
Resolve "filter-aaaa crash in 9.14.1"

Closes #1005

See merge request isc-projects/bind9!1886
2019-05-06 20:57:51 -04:00
Mark Andrews
bdc66eb5d9 add CHANGES 2019-05-07 10:39:49 +10:00
Mark Andrews
2483a8c76d lock accesses to hash table 2019-05-07 10:37:37 +10:00
Mark Andrews
4886701c03 clear pointer before hash table 2019-05-07 10:37:37 +10:00
Mark Andrews
161fec84c7 Merge branch '983-delv-www-isc-org-any-rtrace-multiline-leaks-memory' into 'master'
Resolve "'delv www.isc.org ANY +rtrace +multiline' leaks memory"

Closes #983

See merge request isc-projects/bind9!1812
2019-05-06 20:18:43 -04:00
Mark Andrews
ce5520b695 add CHANGES note 2019-05-07 10:07:02 +10:00
Mark Andrews
6999bee7ef check that delv -t any works 2019-05-07 10:05:25 +10:00
Mark Andrews
32ba5a0494 fix whitespace 2019-05-07 10:05:25 +10:00
Mark Andrews
127333c71f return rdatasets when processing ANY queries in client_resfind 2019-05-07 10:05:25 +10:00
Evan Hunt
cbddd8a0a9 Merge branch 'each-win32-parallel-tests' into 'master'
enable parallel system tests on windows

See merge request isc-projects/bind9!1401
2019-05-06 18:53:32 -04:00
Evan Hunt
d3cd0729c9 CHANGES 2019-05-06 14:20:25 -07:00
Evan Hunt
a33237f070 move the test lists into conf.sh.common
there is now a common list of tests in conf.sh.common, with the
tests that are either unique to windows or to unix, or which are
enabled or disabled by configure or Configure, being listed in
separate variables in conf.sh.in and conf.sh.win32.
2019-05-06 14:07:47 -07:00
Evan Hunt
bbae24c140 enable parallel system tests on windows
this moves the creation of "parallel.mk" into a separate shell script
instead of bin/tests/system/Makefile. that shell script can now be
executed by runall.sh, allowing us to make use of the cygwin "make"
command, which supports parallel execution.
2019-05-06 14:07:47 -07:00
Evan Hunt
7416045f38 Merge branch 'each-simplify-stats' into 'master'
simplify the isc_stat structure to take avantage of atomics

See merge request isc-projects/bind9!1493
2019-05-06 16:08:34 -04:00
Evan Hunt
f1aaf45085 CHANGES 2019-05-06 12:57:38 -07:00
Evan Hunt
4e5edb35e4 simplify the isc_stat structure to take avantage of atomics 2019-05-06 12:53:45 -07:00
Mark Andrews
8aac8358ec Merge branch '1000-arm-doc-rpz-nodata-policy-says-ancount-1' into 'master'
Resolve "ARM doc RPZ NODATA policy says ANCOUNT=1"

Closes #1000

See merge request isc-projects/bind9!1889
2019-05-06 03:35:15 -04:00
Mark Andrews
4889e06c3a A NODATA response has ANCOUNT of 0 assuming no CNAME/DNAMES 2019-05-06 17:13:18 +10:00
Ondřej Surý
f53b9ca88f Merge branch 'ondrej/update-dir-locals.el-for-config.h' into 'master'
Adjust .dir-locals.el to make clang always include config.h

See merge request isc-projects/bind9!1888
2019-05-02 04:55:42 -04:00
Ondřej Surý
7d05ae8b1d Adjust .dir-locals.el to make clang always include config.h 2019-05-02 10:54:37 +02:00
Evan Hunt
cc32080278 Merge branch '956-fix-dnstap-test' into 'master'
attach memory context sooner so that cleanup will work correctly

Closes #956

See merge request isc-projects/bind9!1882
2019-04-26 18:53:11 -04:00
Evan Hunt
0fd344e77a attach memory context sooner so that cleanup will work correctly 2019-04-26 18:27:37 -04:00
Ondřej Surý
f3a242d71d Merge branch '999-tcp-client-crash-v9_11-locks-v9_14-master' into 'master'
Replace atomic operations in bin/named/client.c with isc_refcount reference counting

Closes #999

See merge request isc-projects/bind9!1881
2019-04-26 16:25:49 -04:00
Ondřej Surý
8965a0ba98 Replace atomic operations in bin/named/client.c with isc_refcount reference counting
(cherry picked from commit ef49780d30)
(cherry picked from commit e203d4d65a)
2019-04-26 22:14:26 +02:00
Michał Kępień
b0fd3a2fd1 Merge branch 'michal/simplify-trailing-period-handling-in-system-tests' into 'master'
Simplify trailing period handling in system tests

See merge request isc-projects/bind9!1860
2019-04-26 15:12:08 -04:00
Michał Kępień
da2c1b74ad Simplify trailing period handling in system tests
Windows systems do not allow a trailing period in file names while Unix
systems do.  When BIND system tests are run, the $TP environment
variable is set to an empty string on Windows systems and to "." on Unix
systems.  This environment variable is then used by system test scripts
for handling this discrepancy properly.

In multiple system test scripts, a variable holding a zone name is set
to a string with a trailing period while the names of the zone's
corresponding dlvset-* and/or dsset-* files are determined using
numerous sed invocations like the following one:

    dlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"

In order to improve code readability, use zone names without trailing
periods and replace sed invocations with variable substitutions.

To retain local consistency, also remove the trailing period from
certain other zone names used in system tests that are not subsequently
processed using sed.
2019-04-26 20:38:02 +02:00
Michał Kępień
79357f93c0 Merge branch 'michal/fix-rare-allow-query-system-test-failures' into 'master'
Fix rare "allow-query" system test failures

See merge request isc-projects/bind9!1857
2019-04-26 05:31:25 -04:00
Michał Kępień
978a0d2555 Make root zone data match root hints
In the "allow-query" system test, ns3 uses a root hints file which
contains a single entry for a.root-servers.nil (10.53.0.1).  This name
is not present in the root zone served by ns1, which means querying it
for that name and any type will yield an NXDOMAIN response.  When
combined with unfavorable thread scheduling, this can lead to ns3
caching an NXDOMAIN response for the only root server it is aware of and
thus to false positives for the "allow-query" system test caused by ns3
returning unexpected SERVFAIL responses.  Fix by modifying the root zone
served by ns1 so that authoritative responses to a.root-servers.nil
queries match the root hints file used by ns3.
2019-04-26 11:05:56 +02:00
Evan Hunt
1766a5d9e0 Merge branch '982-filter-aaaa-race' into 'master'
Resolve "filter-aaaa crash in 9.14.0"

Closes #982

See merge request isc-projects/bind9!1861
2019-04-26 03:05:39 -04:00
Evan Hunt
ce8ad08a45 CHANGES 2019-04-26 02:52:39 -04:00
Evan Hunt
4f4c18d643 associate a lock with the memory pool in the filter-aaaa plugin 2019-04-26 02:52:39 -04:00
Ondřej Surý
2c85466c67 Merge branch '615-tcp-client-crash-v9_14-master' into 'master'
Resolve "tcp-clients mostly ineffective"

Closes #615

See merge request isc-projects/bind9!1871
2019-04-25 11:14:50 -04:00
Evan Hunt
4551c58e30 CHANGES, release note
(cherry picked from commit 244e44af432121a05e0a308b7ccce96a8ecd28ab)
(cherry picked from commit 79fad84bf6)
2019-04-25 16:32:32 +02:00
Evan Hunt
d809ec6c14 restore allowance for tcp-clients < interfaces
in the "refactor tcpquota and pipeline refs" commit, the counting
of active interfaces was tightened in such a way that named could
fail to listen on an interface if there were more interfaces than
tcp-clients. when checking the quota to start accepting on an
interface, if the number of active clients was above zero, then
it was presumed that some other client was able to handle accepting
new connections. this, however, ignored the fact that the current client
could be included in that count, so if the quota was already exceeded
before all the interfaces were listening, some interfaces would never
listen.

we now check whether the current client has been marked active; if so,
then the number of active clients on the interface must be greater
than 1, not 0.

(cherry picked from commit 02365b87ea0b1ea5ea8b17376f6734c811c95e61)
(cherry picked from commit cae79e1bab)
2019-04-25 16:32:05 +02:00
Evan Hunt
2f3876d187 refactor tcpquota and pipeline refs; allow special-case overrun in isc_quota
- if the TCP quota has been exceeded but there are no clients listening
  for new connections on the interface, we can now force attachment to the
  quota using isc_quota_force(), instead of carrying on with the quota not
  attached.
- the TCP client quota is now referenced via a reference-counted
  'ns_tcpconn' object, one of which is created whenever a client begins
  listening for new connections, and attached to by members of that
  client's pipeline group. when the last reference to the tcpconn
  object is detached, it is freed and the TCP quota slot is released.
- reduce code duplication by adding mark_tcp_active() function
- convert counters to stdatomic

(cherry picked from commit a8dd133d270873b736c1be9bf50ebaa074f5b38f)
(cherry picked from commit 4a8fc979c4)
2019-04-25 16:32:05 +02:00
Evan Hunt
a0f4a3fa65 better tcpquota accounting and client mortality checks
- ensure that tcpactive is cleaned up correctly when accept() fails.
- set 'client->tcpattached' when the client is attached to the tcpquota.
  carry this value on to new clients sharing the same pipeline group.
  don't call isc_quota_detach() on the tcpquota unless tcpattached is
  set.  this way clients that were allowed to accept TCP connections
  despite being over quota (and therefore, were never attached to the
  quota) will not inadvertently detach from it and mess up the
  accounting.
- simplify the code for tcpquota disconnection by using a new function
  tcpquota_disconnect().
- before deciding whether to reject a new connection due to quota
  exhaustion, check to see whether there are at least two active
  clients. previously, this was "at least one", but that could be
  insufficient if there was one other client in READING state (waiting
  for messages on an open connection) but none in READY (listening
  for new connections).
- before deciding whether a TCP client object can to go inactive, we
  must ensure there are enough other clients to maintain service
  afterward -- both accepting new connections and reading/processing new
  queries.  A TCP client can't shut down unless at least one
  client is accepting new connections and (in the case of pipelined
  clients) at least one additional client is waiting to read.

(cherry picked from commit 427a2fb4d17bc04ca3262f58a9dcf5c93fc6d33e)
(cherry picked from commit 0896841272)
2019-04-25 16:32:05 +02:00
Michał Kępień
3c0f8d9146 use reference counter for pipeline groups (v3)
Track pipeline groups using a shared reference counter
instead of a linked list.

(cherry picked from commit 31f392db20207a1b05d6286c3c56f76c8d69e574)
(cherry picked from commit 2211120222)
2019-04-25 16:32:05 +02:00
Witold Kręcicki
d989a8b38e tcp-clients could still be exceeded (v2)
the TCP client quota could still be ineffective under some
circumstances.  this change:

- improves quota accounting to ensure that TCP clients are
  properly limited, while still guaranteeing that at least one client
  is always available to serve TCP connections on each interface.
- uses more descriptive names and removes one (ntcptarget) that
  was no longer needed
- adds comments

(cherry picked from commit 9e74969f85329fe26df2fad390468715215e2edd)
(cherry picked from commit d7e84cee0b)
2019-04-25 16:32:05 +02:00
Witold Kręcicki
07c3365b0b fix enforcement of tcp-clients (v1)
tcp-clients settings could be exceeded in some cases by
creating more and more active TCP clients that are over
the set quota limit, which in the end could lead to a
DoS attack by e.g. exhaustion of file descriptors.

If TCP client we're closing went over the quota (so it's
not attached to a quota) mark it as mortal - so that it
will be destroyed and not set up to listen for new
connections - unless it's the last client for a specific
interface.

(cherry picked from commit eafcff07c25bdbe038ae1e4b6660602a080b9395)
(cherry picked from commit 9e7617cc84)
2019-04-25 16:32:04 +02:00
Ondřej Surý
7ef3953085 Merge branch '880-secure-asdfasdfasdf-abacadabra-crash-v9_14-master' into 'master'
Resolve "CVE-2019-6467: lib/ns/query.c:9176: INSIST(!qctx->is_zone) failed, back trace"

Closes #880

See merge request isc-projects/bind9!1868
2019-04-25 10:27:33 -04:00
Evan Hunt
38c29c1b5b CHANGES, release note
(cherry picked from commit ab5473007e91f011d003ff0ba5ab32fa0d56360c)
(cherry picked from commit 404be59527)
2019-04-25 16:02:22 +02:00
Matthijs Mekking
f3d3703fe3 Fix nxdomain-redirect assertion failure
- Always set is_zonep in query_getdb; previously it was only set if
  result was ISC_R_SUCCESS or ISC_R_NOTFOUND.
- Don't reset is_zone for redirect.
- Style cleanup.

(cherry picked from commit a85cc641d7a4c66cbde03cc4e31edc038a24df46)
(cherry picked from commit 486a201149)
2019-04-25 16:01:02 +02:00
Matthijs Mekking
2fbadaeec6 Add test for nxdomain-redirect ncachenxdomain
(cherry picked from commit 2d65626630c19bb8159a025accb18e5179da5dc3)
(cherry picked from commit 05d29443eb)
2019-04-25 16:01:02 +02:00
Mark Andrews
9b67f3d34b Merge branch '995-dlz_open_driver-fix-build-failure-without-dlfcn-h' into 'master'
Resolve "dlz_open_driver: fix build failure without dlfcn.h"

Closes #995

See merge request isc-projects/bind9!1854
2019-04-23 19:18:19 -04:00
Mark Andrews
19e4098139 add CHANGES 2019-04-24 09:07:19 +10:00
Mark Andrews
eee8084734 conditionally include <dlfcn.h> 2019-04-24 09:06:08 +10:00
Mark Andrews
ea131d2e6a Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'
Resolve "Wrong key id is displayed for RSAMD5 keys."

Closes #996

See merge request isc-projects/bind9!1852
2019-04-23 18:36:57 -04:00
Mark Andrews
11cddb689f add CHANGES 2019-04-24 08:19:08 +10:00
Mark Andrews
ffaa5a07dd compute the RSAMD5 key id 2019-04-24 08:05:27 +10:00
Matthijs Mekking
e79dd268b6 Merge branch 'matthijs-fix-dnssec-test-intermittent-failure-kskonly' into 'master'
Fix dnssec test intermittent failure related to kskonly bugfix

See merge request isc-projects/bind9!1836
2019-04-23 11:11:19 -04:00
Matthijs Mekking
83473b9758 Harden grep key ID calls
Key IDs may accidentally match dig output that is not the key ID (for
example the RRSIG inception or expiration time, the query ID, ...).
Search for key ID + signer name should prevent that, as that is what
only should occur in the RRSIG record, and signer name always follows
the key ID.
2019-04-23 16:49:38 +02:00
Matthijs Mekking
67f0635f3c Remove sleeps
Remove sleep calls from test, rely on wait_for_log().  Make
wait_for_log() and dnssec_loadkeys_on() fail the test if the
appropriate log line is not found.

Slightly adjust the echo_i() lines to print only the key ID (not the
key name).
2019-04-23 16:49:38 +02:00
Witold Krecicki
671505feb8 Merge branch '992-fetchcount-increment-in-resume-qmin' into 'master'
When resuming from qname-minimization increase fetches-per-zone counters for the 'new' zone

Closes #992

See merge request isc-projects/bind9!1847
2019-04-23 10:27:12 -04:00
Witold Kręcicki
7043c6eaf5 When resuming from qname-minimization increase fetches-per-zone counters for the 'new' zone 2019-04-23 10:16:09 -04:00
Michał Kępień
774b07785c Merge branch 'michal/minor-nsupdate-system-test-tweaks' into 'master'
Minor "nsupdate" system test tweaks

See merge request isc-projects/bind9!1837
2019-04-23 09:20:06 -04:00
Michał Kępień
f8746cddbc Wait more than 1 second for NSEC3 chain changes
One second may not be enough for an NSEC3 chain change triggered by an
UPDATE message to complete.  Wait up to 10 seconds when checking whether
a given NSEC3 chain change is complete in the "nsupdate" system test.
2019-04-23 14:59:05 +02:00
Michał Kępień
1c8e5ea333 Remove redundant sleeps
In the "nsupdate" system test, do not sleep before checking results of
changes which are expected to be processed synchronously, i.e. before
nsupdate returns.
2019-04-23 14:59:05 +02:00
Mark Andrews
fd7f2c8f9d Merge branch 'cleanup-socket-references' into 'master'
use isc_refcount_decrement to decrement NEWCONNSOCK(dev)->references; use...

See merge request isc-projects/bind9!1821
2019-04-23 00:29:30 -04:00
Mark Andrews
265554f895 use isc_refcount_decrement to decrement NEWCONNSOCK(dev)->references; use isc_refcount_increment instead of isc_refcount_init in socket_create 2019-04-23 00:12:17 -04:00
Mark Andrews
3b9d451902 Merge branch 'clang-false-positive' into 'master'
add assertions to silence clang false positive

See merge request isc-projects/bind9!1808
2019-04-22 23:19:28 -04:00
Mark Andrews
bed9ad79ba add assertions to silence clang false positive 2019-04-22 23:03:46 -04:00
Mark Andrews
9482d8470b Merge branch '962-bind-just-disables-gssapi-support-if-no-gssapi-krb5-headers-found' into 'master'
Resolve "Bind just disables GSSAPI support if no GSSAPI/KRB5 headers found"

Closes #962

See merge request isc-projects/bind9!1815
2019-04-22 22:33:42 -04:00
Mark Andrews
e420078c63 make 'configure --with-gssapi=yes' fatal if support is not found 2019-04-22 22:16:59 -04:00
Evan Hunt
c9cb567f17 Merge branch '990-return-servfail' into 'master'
force SERVFAIL response in the gotanswer failure case

Closes #990

See merge request isc-projects/bind9!1838
2019-04-22 22:07:50 -04:00
Evan Hunt
4d358c9bce CHANGES 2019-04-22 18:48:19 -07:00
Evan Hunt
7402615697 force SERVFAIL response in the gotanswer failure case
- named could return FORMERR if parsing iterative responses
  ended with a result code such as DNS_R_OPTERR. instead of
  computing a response code based on the result, in this case
  we now just force the response to be SERVFAIL.
2019-04-22 18:48:19 -07:00
Mark Andrews
f3e2780dc8 Merge branch 'incorrect-use-of-bool' into 'master'
using 0 instead of false

See merge request isc-projects/bind9!1820
2019-04-22 21:25:33 -04:00
Mark Andrews
da7f683abf using 0 instead of false 2019-04-23 11:08:06 +10:00
Michał Kępień
e47754d7bf Merge branch 'michal/win32-system-test-fixes' into 'master'
Miscellaneous Windows system test fixes

See merge request isc-projects/bind9!1794
2019-04-19 05:52:14 -04:00
Michał Kępień
b6c1cdfffe Update interface lists in ifconfig scripts
Make bin/tests/system/ifconfig.bat also configure addresses ending with
9 and 10, so that the script is in sync with its Unix counterpart.

Update comments listing the interfaces created by ifconfig.{bat,sh} so
that they do not include addresses whose last octet is zero (since an
address like 10.53.1.0/24 is not a valid host address and thus the
aforementioned scripts do not even attempt configuring them).
2019-04-19 11:27:06 +02:00
Michał Kępień
e4280ed9f5 Fix the "dnssec" system test on Windows
On Windows, the bin/tests/system/dnssec/signer/example.db.signed file
contains carriage return characters at the end of each line.  Remove
them before passing the aforementioned file to the awk script extracting
key IDs so that the latter can work properly.
2019-04-19 11:21:43 +02:00
Michał Kępień
761ba4514f Do not wait for lock file cleanup on Windows
As signals are currently not handled by named on Windows, instances
terminated using signals are not able to perform a clean shutdown, which
involves e.g. removing the lock file.  Thus, waiting for a given
instance's lock file to be removed beforing assuming it is shut down
is pointless on Windows, so do not even attempt it.
2019-04-19 11:21:43 +02:00
Michał Kępień
28f5400d0d Merge branch '979-win32-remove-lock-file-upon-shutdown' into 'master'
win32: remove lock file upon shutdown

Closes #979

See merge request isc-projects/bind9!1793
2019-04-19 05:20:30 -04:00
Michał Kępień
e048436805 Add CHANGES entry
5214.	[bug]		win32: named now removes its lock file upon shutdown.
			[GL #979]
2019-04-19 10:59:41 +02:00
Michał Kępień
c506077da5 win32: remove lock file upon shutdown
Upon named shutdown, the lock file should not just be unlocked but also
removed.
2019-04-19 10:59:41 +02:00
Michał Kępień
9fceb376c6 Merge branch '978-win32-fix-service-state-reported-during-shutdown' into 'master'
win32: fix service state reported during shutdown

Closes #978

See merge request isc-projects/bind9!1792
2019-04-19 04:19:34 -04:00
Michał Kępień
e7332343ed Add CHANGES entry
5213.	[bug]		win32: Eliminated a race which allowed named.exe running
			as a service to be killed prematurely during shutdown.
			[GL #978]
2019-04-19 09:37:51 +02:00
Michał Kępień
964749dfdb win32: fix service state reported during shutdown
When a Windows service receives a request to stop, it should not set its
state to SERVICE_STOPPED until it is completely shut down as doing that
allows the operating system to kill that service prematurely, which in
the case of named may e.g. prevent the PID file and/or the lock file
from being cleaned up.

Set service state to SERVICE_STOP_PENDING when named begins its shutdown
and only report the SERVICE_STOPPED state immediately before exiting.
2019-04-19 09:37:51 +02:00
Ondřej Surý
1a9be94f83 Merge branch '989-check-for-typeof-extension' into 'master'
Use uintmax_t instead of typeof(x) in the ISC_ALIGN macro on non-GNUC systems

Closes #989

See merge request isc-projects/bind9!1826
2019-04-18 07:16:04 -04:00
Ondřej Surý
2e40cc94dc On non-GNUC systems, use uintmax_t in the ISC_ALIGN macro 2019-04-18 12:55:25 +02:00
Ondřej Surý
9d329a5e74 Merge branch 'ondrej/text-files-dont-need-copyright' into 'master'
Simple text files don't need copyright header

See merge request isc-projects/bind9!1809
2019-04-18 02:53:51 -04:00
Ondřej Surý
1877139a32 Simple text files with docs on build or design don't really need copyright on their own 2019-04-18 08:52:00 +02:00
Ondřej Surý
abce724ad9 Merge branch 'ondrej/refactor-DNS_RDATASET_FIXED-code-flow' into 'master'
Refactor the DNS_RDATASET_FIXED code to use macros instead of ifdefs

See merge request isc-projects/bind9!1811
2019-04-17 04:46:37 -04:00
Ondřej Surý
4edbb773a1 Refactor the DNS_RDATASET_FIXED code to use constants instead of ifdefs 2019-04-17 10:35:11 +02:00
Evan Hunt
87daa5471d Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1813
2019-04-16 15:57:26 -04:00
Evan Hunt
591e37a7e2 placeholder 2019-04-16 12:56:59 -07:00
Evan Hunt
fad7b2a6f8 Merge branch '817-out-of-zone-additional' into 'master'
out of zone additional data

Closes #817

See merge request isc-projects/bind9!1366
2019-04-15 14:23:16 -04:00
Evan Hunt
5071e43c19 CHANGES 2019-04-15 11:05:18 -07:00
Evan Hunt
b7e9115793 revise "minimal-responses" documentation in the ARM 2019-04-15 11:05:18 -07:00
Evan Hunt
7fff3295f5 if recursion is allowed and minimal-responses is no, search other databases
this restores functionality that was removed in commit 03be5a6b4e,
allowing named to search in authoritative zone databases outside the
current zone for additional data, if and only if recursion is allowed
and minimal-responses is disabled.
2019-04-15 11:05:04 -07:00
Mark Andrews
d134dd9c8c Merge branch '980-util-update_copyrights-now-needs-to-handle-files-with-cr-lf-endings' into 'master'
Resolve "util/update_copyrights now needs to handle files with CR LF endings."

Closes #980

See merge request isc-projects/bind9!1801
2019-04-12 00:28:06 -04:00
Mark Andrews
e76936fd85 support files which have CR LF ending like those in win32utils 2019-04-12 14:09:01 +10:00
Evan Hunt
a3fd41157d Merge branch '963-dnstap-check-ra' into 'master'
dnstap: if recursion is not available, log queries as AQ instead of CQ

Closes #963

See merge request isc-projects/bind9!1756
2019-04-11 18:43:14 -04:00
Evan Hunt
3b9dee0baa CHANGES 2019-04-11 15:21:57 -07:00
Evan Hunt
1f578cdb12 dnstap: if recursion is not available, log queries as AQ instead of CQ 2019-04-11 15:13:13 -07:00
Evan Hunt
9b1304be36 Merge branch '972-auto-validation-summary' into 'master'
configure summary failed to report --disable-auto-validation correctly

Closes #972

See merge request isc-projects/bind9!1768
2019-04-11 11:42:27 -04:00
Evan Hunt
4b63853aa1 configure summary failed to report --disable-auto-validation correctly 2019-04-11 08:31:40 -07:00
Matthijs Mekking
8184e5097c Merge branch '763-matthijs-active-zsk-but-ksk-only-2' into 'master'
Don't sign DNSKEY RRset with ZSK if the KSK is offline and dnskey-kskonly

Closes #763

See merge request isc-projects/bind9!1747
2019-04-11 09:41:30 -04:00
Matthijs Mekking
3cb8c49c73 With update-check-ksk also consider offline keys
The option `update-check-ksk` will look if both KSK and ZSK are
available before signing records.  It will make sure the keys are
active and available.  However, for operational practices keys may
be offline.  This commit relaxes the update-check-ksk check and will
mark a key that is offline to be available when adding signature
tasks.
2019-04-11 15:22:30 +02:00
Matthijs Mekking
2e83e3255a Style: some curly brackets 2019-04-11 15:22:30 +02:00
Matthijs Mekking
d330986374 Add detail on echo message in autosign test 2019-04-11 15:22:30 +02:00
Matthijs Mekking
8bc10bcf59 Add test for ZSK rollover while KSK offline
This commit adds a lengthy test where the ZSK is rolled but the
KSK is offline (except for when the DNSKEY RRset is changed).  The
specific scenario has the `dnskey-kskonly` configuration option set
meaning the DNSKEY RRset should only be signed with the KSK.

A new zone `updatecheck-kskonly.secure` is added to test against,
that can be dynamically updated, and that can be controlled with rndc
to load the DNSSEC keys.

There are some pre-checks for this test to make sure everything is
fine before the ZSK roll, after the new ZSK is published, and after
the old ZSK is deleted.  Note there are actually two ZSK rolls in
quick succession.

When the latest added ZSK becomes active and its predecessor becomes
inactive, the KSK is offline.  However, the DNSKEY RRset did not
change and it has a good signature that is valid for long enough.
The expected behavior is that the DNSKEY RRset stays signed with
the KSK only (signature does not need to change).  However, the
test will fail because after reconfiguring the keys for the zone,
it wants to add re-sign tasks for the new active keys (in sign_apex).
Because the KSK is offline, named determines that the only other
active key, the latest ZSK, will be used to resign the DNSKEY RRset,
in addition to keeping the RRSIG of the KSK.

The question is: Why do we need to resign the DNSKEY RRset
immediately when a new key becomes active?  This is not required,
only once the next resign task is triggered the new active key
should replace signatures that are in need of refreshing.
2019-04-11 15:22:30 +02:00
Mark Andrews
67d75732b6 Merge branch '899-add-totext-fromtext-to-wirechecks' into 'master'
Run wire check through "totext" and "fromtext" methods including multi-line.

See merge request isc-projects/bind9!1572
2019-04-11 05:37:58 -04:00
Mark Andrews
307a1b563b Add CHANGES 2019-04-11 19:19:46 +10:00
Mark Andrews
b78e128a2f Add debug printfs 2019-04-11 19:19:46 +10:00
Mark Andrews
e73a5b0ce3 Prevent WIRE_INVALID() being called without a argument 2019-04-11 19:19:46 +10:00
Mark Andrews
b089f43b7a Check multi-line output from dns_rdata_tofmttext()
Check that multi-line output from dns_rdata_tofmttext() can be read
back in by dns_rdata_fromtext().
2019-04-11 19:19:46 +10:00
Mark Andrews
1a75a5cee6 Process master file comments and make input invalid again 2019-04-11 19:19:10 +10:00
Mark Andrews
7941a9554f Set 'specials' to match 'specials' in 'lib/dns/master.c' 2019-04-11 18:13:39 +10:00
Mark Andrews
cc5e16e4d3 Fix whitespace so that the names align 2019-04-11 18:13:39 +10:00
Mark Andrews
36f30f5731 Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire
Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire for
valid inputs to ensure that what we accept in dns_rdata_fromwire()
can be written out and read back in.
2019-04-11 18:13:39 +10:00
Mark Andrews
961d256d73 Merge branch '965-delv-prints-weird-ttl-values-2' into 'master'
Test that dig and delve print correct TTL values.

Closes #965

See merge request isc-projects/bind9!1782
2019-04-10 01:24:44 -04:00
Mark Andrews
dfc485b02e add CHANGES 2019-04-10 15:06:54 +10:00
Matthijs Mekking
195277ca6d Check dig TTLs.
This also fixes a bug in the tests ($n was not incremented in one
place).
2019-04-10 15:06:13 +10:00
Mark Andrews
146202d6a8 Check delv TTLs. 2019-04-10 15:06:13 +10:00
Mark Andrews
68851ddb76 Merge branch '965-delv-prints-weird-ttl-values' into 'master'
Initialise view->mincachettl and view->minncachettl to zero in dns_view_create.

Closes #965

See merge request isc-projects/bind9!1760
2019-04-10 01:04:24 -04:00
Mark Andrews
538da8c80d Add CHANGES. 2019-04-10 14:49:28 +10:00
Mark Andrews
8fd4308bda Initialise mincachettl and minncachettl to zero in dns_view_create. 2019-04-10 14:48:49 +10:00
Mark Andrews
0fb2cf1e44 Merge branch '899-enforce-hash-in-ds' into 'master'
enforce DS hash exists

See merge request isc-projects/bind9!1575
2019-04-10 00:40:14 -04:00
Mark Andrews
97b7360ce1 add CHANGES 2019-04-10 13:39:51 +10:00
Mark Andrews
6eb28eda1e add ds unit test 2019-04-10 13:37:03 +10:00
Mark Andrews
b274f3fad7 enforce DS hash exists 2019-04-10 13:36:08 +10:00
Mark Andrews
a32a4ed945 Merge branch '852-run-fromtext-through-fromwire' into 'master'
check that from fromtext produces valid towire input

Closes #852

See merge request isc-projects/bind9!1738
2019-04-09 21:27:48 -04:00
Mark Andrews
d712b88048 add CHANGES 2019-04-10 11:16:55 +10:00
Mark Andrews
7b0a653858 check that from fromtext produces valid towire input 2019-04-10 11:13:52 +10:00
Ondřej Surý
cd68cfffbf Merge branch '971-downgrade-DLZ_DBCLIENTINFO_VERSION-in-dlz_minimal.h' into 'master'
Downgrade the dns_clientinfo_t structure to not contain dbversion

Closes #971

See merge request isc-projects/bind9!1773
2019-04-09 15:24:37 -04:00
Ondřej Surý
a6f09b2255 Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c 2019-04-09 10:06:12 +01:00
Mark Andrews
43828818a4 Merge branch '899-fromwire-check-flags-for-nokey' into 'master'
Check KEY flags for empty key in fromwire method

See merge request isc-projects/bind9!1574
2019-04-09 00:16:00 -04:00
Mark Andrews
f78c688c4f add CHANGES 2019-04-09 13:56:05 +10:00
Mark Andrews
82d4931440 for rkey flags MUST be zero 2019-04-09 13:55:30 +10:00
Mark Andrews
2592e91516 check flags for no key in fromwire for *KEY 2019-04-09 13:55:30 +10:00
Mark Andrews
629b978fd8 Merge branch '976-dns-ecs-h-missing-isc_lang_enddecls' into 'master'
Resolve "dns/ecs.h missing ISC_LANG_ENDDECLS"

Closes #976

See merge request isc-projects/bind9!1774
2019-04-08 21:59:30 -04:00
Mark Andrews
698a6f955e <dns/ecs.h> was missing ISC_LANG_ENDDECLS. 2019-04-09 11:47:26 +10:00
Evan Hunt
27d788cff3 Merge branch '973-pause-dbiterator-in-rpz' into 'master'
Fix deadlock in RPZ update code.

Closes #973

See merge request isc-projects/bind9!1770
2019-04-06 15:23:37 -04:00
Witold Kręcicki
06021b3529 Fix deadlock in RPZ update code.
In dns_rpz_update_from_db we call setup_update which creates the db
iterator and calls dns_dbiterator_first. This unpauses the iterator and
might cause db->tree_lock to be acquired. We then do isc_task_send(...)
on an event to do quantum_update, which (correctly) after each iteration
calls dns_dbiterator_pause, and re-isc_task_sends itself.

That's an obvious bug, as we're holding a lock over an async task send -
if a task requesting write (e.g. prune_tree) is scheduled on the same
workers queue as update_quantum but before it, it will wait for the
write lock indefinitely, resulting in a deadlock.

To fix it we have to pause dbiterator in setup_update.
2019-04-06 12:22:49 -07:00
Evan Hunt
b22a5b6fac Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1771
2019-04-06 15:20:51 -04:00
Evan Hunt
610d13b456 placeholder 2019-04-06 12:20:16 -07:00
Michał Kępień
23e6a908df Merge branch '893-do-not-rely-on-default-dig-options-in-system-tests' into 'master'
Do not rely on default dig options in system tests

Closes #893

See merge request isc-projects/bind9!1556
2019-04-03 07:21:56 -04:00
Michał Kępień
b6cce0fb8b Do not rely on default dig options in system tests
Some system tests assume dig's default setings are in effect.  While
these defaults may only be silently overridden (because of specific
options set in /etc/resolv.conf) for BIND releases using liblwres for
parsing /etc/resolv.conf (i.e. BIND 9.11 and older), it is arguably
prudent to make sure that tests relying on specific +timeout and +tries
settings specify these explicitly in their dig invocations, in order to
prevent test failures from being triggered by any potential changes to
current defaults.
2019-04-03 12:57:33 +02:00
Witold Krecicki
7e069cb16a Merge branch '966-resume-qmin-shuttingdown' into 'master'
Fix high load race crash in resolver code

Closes #966

See merge request isc-projects/bind9!1757
2019-03-29 11:22:57 -04:00
Witold Kręcicki
d11791e24c CHANGES 2019-03-29 15:53:17 +01:00
Witold Kręcicki
7c960e89ea In resume_qmin check if the fetch context is already shutting down - if so, try to destroy it, don't continue 2019-03-29 14:30:40 +01:00
Mark Andrews
e9771830b8 Merge branch '920-see-problem-when-multiple-sigs-with-besteffort-parsing' into 'master'
Address problems with best effort parsing.

Closes #920

See merge request isc-projects/bind9!1606
2019-03-26 06:30:12 -04:00
Mark Andrews
b779342017 add CHANGES 2019-03-26 21:18:19 +11:00
Witold Kręcicki
51a55ddbb7 Fix assertion failure in nslookup/dig/mdig when message has multiple SIG(0) options.
When parsing message with DNS_MESSAGE_BESTEFFORT (used exclusively in
tools, never in named itself) if we hit an invalid SIG(0) in wrong
place we continue parsing the message, and put the sig0 in msg->sig0.
If we then hit another sig0 in a proper place we see that msg->sig0
is already 'taken' and we don't free name and rdataset, and we don't
set seen_problem. This causes an assertion failure.
This fixes that issue by setting seen_problem if we hit second sig0,
tsig or opt, which causes name and rdataset to be always freed.
2019-03-26 21:15:00 +11:00
Mark Andrews
b01ed54bad Merge branch '955-make-install-fails-after-configure-with-dlopen-no' into 'master'
Resolve "`make install` fails after ./configure --with-dlopen=no"

Closes #955

See merge request isc-projects/bind9!1742
2019-03-26 04:52:40 -04:00
Mark Andrews
bd670d4a04 add CHANGES 2019-03-26 19:38:56 +11:00
Mark Andrews
cd3593c38d fix plugin installation 2019-03-26 19:38:13 +11:00
Ondřej Surý
d089387d7f Merge branch '4-make-dnstap.pb-c.h-private' into 'master'
Make lib/dns/dnstap.pb-c.h header a private to lib/dns

See merge request isc-projects/bind9!1744
2019-03-22 06:58:02 -04:00
Ondřej Surý
8ccce7e24b Make lib/dns/dnstap.pb-c.h private header
This changes dns_dtdata struct to not expose data types from dnstap.pb-c.h to
prevent the need for including this header where not really needed.
2019-03-22 11:38:45 +01:00
Evan Hunt
d0cda3dc83 Merge branch '913-allow-update' into 'master'
restore inheritance of 'allow-update' and 'allow-update-forwarding'

Closes #913

See merge request isc-projects/bind9!1720
2019-03-22 03:10:17 -04:00
Evan Hunt
55a7961cf3 CHANGES, release notes 2019-03-21 21:17:50 -07:00
Evan Hunt
91dca0f8da don't fail when allow-update{,-forwarding} is used globally 2019-03-21 21:17:49 -07:00
Mark Andrews
11c862efff Merge branch '899-zonemd-check-for-hash-existence' into 'master'
zonemd require non empty hash

Closes #899

See merge request isc-projects/bind9!1739
2019-03-21 15:50:29 -04:00
Mark Andrews
e1db1b8dcb add CHANGES 2019-03-22 06:49:09 +11:00
Mark Andrews
473987d8d9 Disallow empty ZONEMD hashes
This change is the result of discussions with the authors of
draft-wessels-dns-zone-digest.
2019-03-22 06:49:01 +11:00
Mark Andrews
ffba2eb60d Merge branch '899-eid-totext-is-broken' into 'master'
EID and NIMLOC totext is broken.

See merge request isc-projects/bind9!1571
2019-03-21 05:09:50 -04:00
Mark Andrews
c20b89fcf8 add CHANGES 2019-03-21 19:52:27 +11:00
Mark Andrews
40a770b932 add brackets for multi-line output 2019-03-21 19:52:27 +11:00
Michał Kępień
69468e5417 Merge branch 'michal/fix-key-id-extraction-in-the-dnssec-system-test' into 'master'
Fix key ID extraction in the "dnssec" system test

See merge request isc-projects/bind9!1732
2019-03-21 03:35:52 -04:00
Michał Kępień
a40c60e4c1 Fix key ID extraction in the "dnssec" system test
Simply looking for the key ID surrounded by spaces in the tested
dnssec-signzone output file is not a precise enough method of checking
for signatures prepared using a given key ID: it can be tripped up by
cross-algorithm key ID collisions and certain low key IDs (e.g. 60, the
TTL specified in bin/tests/system/dnssec/signer/example.db.in), which
triggers false positives for the "dnssec" system test.  Make key ID
extraction precise by using an awk script which operates on specific
fields.
2019-03-20 22:21:30 +01:00
Michał Kępień
a17aff7421 Merge branch 'michal/minor-mirror-system-test-tweaks' into 'master'
Minor "mirror" system test tweaks

See merge request isc-projects/bind9!1713
2019-03-20 05:09:21 -04:00
Michał Kępień
73afbdc552 Increase dig query timeout to 2 seconds
The "mirror" system test expects all dig queries (including recursive
ones) to be responded to within 1 second, which turns out to be overly
optimistic in certain cases and leads to false positives being
triggered.  Increase dig query timeout used throughout the "mirror"
system test to 2 seconds in order to alleviate the issue.
2019-03-20 09:50:35 +01:00
Michał Kępień
6847a29b54 Increase TAT query interval
Currently, ns3 in the "mirror" system test sends trust anchor telemetry
queries every second as it is started with "-T tat=1".  Given the number
of trust anchors configured on ns3 (9), TAT-related traffic clutters up
log files, hindering troubleshooting efforts.  Increase TAT query
interval to 3 seconds in order to alleviate the issue.

Note that the interval chosen cannot be much higher if intermittent test
failures are to be avoided: TAT queries are only sent after the
configured number of seconds passes since resolver startup.  Quick
experiments show that even on contemporary hardware, ns3 should be
running for at least 5 seconds before it is first shut down, so a
3-second TAT query interval seems to be a reasonable, future-proof
compromise.  Ensure the relevant check is performed before ns3 is first
shut down to emphasize this trade-off and make it more clear by what
time TAT queries are expected to be sent.
2019-03-20 09:50:35 +01:00
Ondřej Surý
c6b0384138 Merge branch '4-update-gitignore-for-future-automake' into 'master'
Update and sort the top level .gitignore to ignore automake files

See merge request isc-projects/bind9!1727
2019-03-20 04:24:41 -04:00
Ondřej Surý
b9d524ed7e Sort the top level .gitignore file 2019-03-20 09:22:22 +01:00
Ondřej Surý
5c67d1d120 Update top level .gitignore to ignore automake files 2019-03-20 09:20:14 +01:00
Michał Kępień
abbdf3d77e Merge branch 'michal/serve-stale-system-test-wait-for-dump-completion' into 'master'
"serve-stale" system test: wait until "rndc dumpdb" completes

See merge request isc-projects/bind9!1712
2019-03-20 04:08:04 -04:00
Michał Kępień
6e3f812afc Wait until "rndc dumpdb" completes
"rndc dumpdb" works asynchronously, i.e. the requested dump may not yet
be fully written to disk by the time "rndc" returns.  Prevent false
positives for the "serve-stale" system test by only checking dump
contents after the line indicating that it is complete is written.
2019-03-20 08:46:58 +01:00
Mark Andrews
cde8df8be4 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1724
2019-03-19 21:43:27 -04:00
Mark Andrews
2bddb0e2af placeholder 2019-03-20 12:24:32 +11:00
Mark Andrews
8bbb9ac3e9 Merge branch 'regen-configure' into 'master'
Regen configure

See merge request isc-projects/bind9!1721
2019-03-19 18:43:00 -04:00
Mark Andrews
db2912b099 clean up virtual-time removal 2019-03-20 09:26:10 +11:00
Ondřej Surý
394848b053 Merge branch '4-remove-unused-virtual-time-tests-copyrights' into 'master'
Cleanup util/copyrights after virtual-time removal

See merge request isc-projects/bind9!1719
2019-03-19 16:38:13 -04:00
Ondřej Surý
66e58dc37e Cleanup util/copyrights after virtual-time removal 2019-03-19 21:37:04 +01:00
Ondřej Surý
6b8414db37 Merge branch '4-make-builtin-test-use-named--V-to-get-version' into 'master'
Make builtin test use dynamic version from named -V

See merge request isc-projects/bind9!1717
2019-03-19 16:35:12 -04:00
Ondřej Surý
e3aa835a8f Make builtin test use dynamic version from named -V 2019-03-19 21:34:31 +01:00
Ondřej Surý
8dde994d24 Merge branch '4-remove-unused-virtual-time-tests' into 'master'
Reduce the software entropy in the BIND source code by removing unused...

See merge request isc-projects/bind9!1718
2019-03-19 16:31:49 -04:00
Ondřej Surý
4286409d6b Reduce the software entropy in the BIND source code by removing unused bin/tests/virtual-time/ directory. 2019-03-19 21:24:12 +01:00
Ondřej Surý
6abf541f9a Merge branch '4-limit-spatch-to-bin-and-lib' into 'master'
Limit spatch to bin, lib and fuzz directories

See merge request isc-projects/bind9!1716
2019-03-19 15:16:19 -04:00
Ondřej Surý
51b9a8960a Limit spatch to bin, lib and fuzz directories 2019-03-19 20:15:27 +01:00
Matthijs Mekking
624bb177c4 Merge branch '757-unsupported-algorithms' into 'master'
Resolve "Investigate and fix what happens when managed-key algorithm is not supported"

Closes #806 and #757

See merge request isc-projects/bind9!1350
2019-03-19 12:31:07 -04:00
Matthijs Mekking
768ded1102 Update CHANGES 2019-03-19 17:14:18 +01:00
Matthijs Mekking
a67dac5d21 Add documentation 2019-03-19 17:14:18 +01:00
Matthijs Mekking
3b7c849a3f DLV tests unsupported/disabled algorithms
This tests both the cases when the DLV trust anchor is of an
unsupported or disabled algorithm, as well as if the DLV zone
contains a key with an unsupported or disabled algorithm.
2019-03-19 17:14:18 +01:00
Michał Kępień
b85007e0a6 Move code handling key loading errors into a common function
Some values returned by dstkey_fromconfig() indicate that key loading
should be interrupted, others do not.  There are also certain subsequent
checks to be made after parsing a key from configuration and the results
of these checks also affect the key loading process.  All of this
complicates the key loading logic.

In order to make the relevant parts of the code easier to follow, reduce
the body of the inner for loop in load_view_keys() to a single call to a
new function, process_key().  Move dstkey_fromconfig() error handling to
process_key() as well and add comments to clearly describe the effects
of various key loading errors.
2019-03-19 17:14:18 +01:00
Matthijs Mekking
4d1ed1283a Also ignore configured revoked trusted anchors 2019-03-19 17:14:18 +01:00
Matthijs Mekking
1d45ad8f39 Ignore trust anchors using disabled algorithm
More specifically: ignore configured trusted and managed keys that
match a disabled algorithm.  The behavioral change is that
associated responses no longer SERVFAIL, but return insecure.
2019-03-19 17:14:18 +01:00
Matthijs Mekking
07c35f32f9 Move algorithm variables, add disabled algorithms
Move from conf.sh.in to conf.sh.common as they will also need to be
added to conf.sh.win32.  Add variables for testing disabled
algorithms.
2019-03-19 17:14:18 +01:00
Matthijs Mekking
924fdad0e5 Add inline test related to unsupported algorithms 2019-03-19 17:14:18 +01:00
Matthijs Mekking
dfcf9bb0ed System tests for tools and unsupported algorithms 2019-03-19 17:14:18 +01:00
Ondřej Surý
8981a07311 Merge branch '4-use-TOP-from-conf.sh-in-ifconfig.sh' into 'master'
Make ifconfig.sh resilient to the directory where it is run

See merge request isc-projects/bind9!1715
2019-03-19 10:39:41 -04:00
Ondřej Surý
f86c15f649 Make ifconfig.sh more resilient to the directory where it is run 2019-03-19 15:26:23 +01:00
Ondřej Surý
f2642f4fb8 Merge branch '4-add-shell-system-test-driver' into 'master'
Add automake-compatible test driver for system tests

See merge request isc-projects/bind9!1714
2019-03-19 10:13:19 -04:00
Ondřej Surý
25a689ec7b Add shell system test driver 2019-03-19 15:09:59 +01:00
Michał Kępień
85ea0edf2f Merge branch '944-make-stop.pl-wait-for-lock-file-cleanup' into 'master'
Make stop.pl wait for lock file cleanup

Closes #944

See merge request isc-projects/bind9!1704
2019-03-19 06:18:35 -04:00
Michał Kępień
c787a539d2 Make stop.pl wait for lock file cleanup
bin/tests/system/stop.pl only waits for the PID file to be cleaned up
while named cleans up the lock file after the PID file.  Thus, the
aforementioned script may consider a named instance to be fully shut
down when in fact it is not.

Fix by also checking whether the lock file exists when determining a
given instance's shutdown status.  This change assumes that if a named
instance uses a lock file, it is called "named.lock".

Also rename clean_pid_file() to pid_file_exists(), so that it is called
more appropriately (it does not clean up the PID file itself, it only
returns the server's identifier if its PID file is not yet cleaned up).
2019-03-19 10:26:36 +01:00
Michał Kępień
4afad2a047 Correctly invoke stop.pl when start.pl fails
MR !1141 broke the way stop.pl is invoked when start.pl fails:

  - start.pl changes the working directory to $testdir/$server before
    attempting to start $server,

  - commit 27ee629e6b causes the $testdir
    variable in stop.pl to be determined using the $SYSTEMTESTTOP
    environment variable, which is set to ".." by all tests.sh scripts,

  - commit e227815af5 makes start.pl pass
    $test (the test's name) rather than $testdir (the path to the test's
    directory) to stop.pl when a given server fails to start.

Thus, when a server is restarted from within a tests.sh script and such
a restart fails, stop.pl attempts to look for the server directory in a
nonexistent location ($testdir/$server/../$test, i.e. $testdir/$test,
instead of $testdir/../$test).  Fix the issue by changing the working
directory before stop.pl is invoked in the scenario described above.
2019-03-19 10:26:36 +01:00
Evan Hunt
bd55366bef Merge branch 'each-bindkeys-comments' into 'master'
update bind.keys comments

See merge request isc-projects/bind9!1707
2019-03-19 00:20:21 -04:00
Evan Hunt
01e7ecfea6 update bind.keys comments 2019-03-18 21:19:40 -07:00
Evan Hunt
ab2d411996 Merge branch '945-remove-revoked-root-key-from-bind-keys' into 'master'
Resolve "Remove revoked root key from bind.keys."

Closes #945

See merge request isc-projects/bind9!1705
2019-03-19 00:12:36 -04:00
Mark Andrews
0e805b58e8 Remove revoked root DNSKEY from bind.keys. 2019-03-19 10:32:42 +11:00
Matthijs Mekking
c3fb2c4c77 Merge branch 'revert-0d379587' into 'master'
Revert "Merge branch 'placeholder-5889' into 'master'"

See merge request isc-projects/bind9!1703
2019-03-18 06:46:01 -04:00
Matthijs Mekking
65d63eda34 Revert "Merge branch 'placeholder-5889' into 'master'"
This reverts merge request !1702
2019-03-18 06:11:26 -04:00
Matthijs Mekking
0d37958723 Merge branch 'placeholder-5889' into 'master'
placeholder

See merge request isc-projects/bind9!1702
2019-03-15 09:03:47 -04:00
Matthijs Mekking
1e1c223a0a placeholder 2019-03-15 13:43:19 +01:00
Evan Hunt
1fbb76ef4d Merge branch '866-deprecate-dnssec-enable' into 'master'
deprecate "dnssec-enable"

Closes #866

See merge request isc-projects/bind9!1666
2019-03-15 02:44:09 -04:00
Evan Hunt
89eed3d0b2 CHANGES, release note 2019-03-14 23:30:13 -07:00
Evan Hunt
885a3d208e remove "dnssec-enable" from all system tests 2019-03-14 23:30:13 -07:00
Evan Hunt
b3ff3bf2e4 remove configuration, syntax checking and implementation of dnssec-enable 2019-03-14 23:29:07 -07:00
Evan Hunt
d069658626 remove references to dnssec-enable in the documentation 2019-03-14 23:29:07 -07:00
Evan Hunt
fd298a2da8 mark "dnssec-enable" as obsolete in the parser 2019-03-14 23:29:07 -07:00
Mark Andrews
92c9d052a2 Merge branch '940-unit-dnstap-pkcs11-tz' into 'master'
Fix regression in dnstap_test with native pkcs11

Closes #940

See merge request isc-projects/bind9!1688
2019-03-15 01:14:24 -04:00
Mark Andrews
788f784191 add CHANGES 2019-03-15 16:08:03 +11:00
Petr Menšík
71c4fad592 Fix regression in dnstap_test with native pkcs11
Change to cmocka broken initialization of TZ environment. This time,
commit 1cf1254051 is not soon enough. Has
to be moved more forward, before any other tests. It library is not full
reinitialized on each test.
2019-03-15 01:03:53 -04:00
Mark Andrews
e4b4361284 Merge branch 'rename-shadowed-variable' into 'master'
rename-shadowed-variable

See merge request isc-projects/bind9!1698
2019-03-14 21:18:57 -04:00
Mark Andrews
15bfe4f2e1 rename-shadowed-variable 2019-03-15 11:13:05 +11:00
Evan Hunt
ef12cdc653 Merge branch 'ondrej/improve-cmdline-printing-to-handle-special-characters' into 'master'
Improve printing of the cmdline to also correctly print the control characters…

See merge request isc-projects/bind9!1280
2019-03-14 17:58:19 -04:00
Joey Salazar
6acc306b10 Test named logs cmd line as expected
Test named logs control characters, special characters and large cmd line respectively as octal escaped, special escaped and elipsis
2019-03-14 14:43:45 -07:00
Ondřej Surý
6335043890 Improve printing of the cmdline
- Print control characters in octal
- Shorten using an ellipsis when necessary
2019-03-14 14:42:50 -07:00
Evan Hunt
31df6789d8 Merge branch '938-cppcheck-format-issues' into 'master'
Resolve "Cppcheck format issues."

Closes #938

See merge request isc-projects/bind9!1685
2019-03-14 16:46:12 -04:00
Mark Andrews
1eba2c5b06 force promotion to unsigned int 2019-03-14 13:34:59 -07:00
Mark Andrews
a43d648b95 isc_quota_* return unsigned int 2019-03-14 13:34:59 -07:00
Evan Hunt
e08e800387 Merge branch '890-assert-the-hevent-rdataset-is-non-null' into 'master'
Resolve "Assert the hevent->rdataset is non-NULL."

Closes #890

See merge request isc-projects/bind9!1543
2019-03-14 16:06:51 -04:00
Mark Andrews
d8d04edfba assert hevent->rdataset is non NULL 2019-03-14 12:47:53 -07:00
Evan Hunt
d27a061fa2 Merge branch '937-potential-null-pointer-dereference-in-bin-tests-system-dlzexternal-driver-c' into 'master'
Resolve "potential null pointer dereference in bin/tests/system/dlzexternal/driver.c"

Closes #937

See merge request isc-projects/bind9!1683
2019-03-14 15:43:15 -04:00
Mark Andrews
7bf6750330 check that state and state->log are non NULL before calling state->log 2019-03-14 15:28:58 -04:00
Evan Hunt
f881c7b4b8 Merge branch 'missing-isc-lang-h' into 'master'
missing #include <isc/lang.h>

See merge request isc-projects/bind9!1687
2019-03-14 15:23:21 -04:00
Mark Andrews
719b1d7fdc missing #include <isc/lang.h> 2019-03-15 00:24:33 +11:00
Mark Andrews
ef978c9279 Merge branch 'u/fanf2/man-dnssec-keygen-again' into 'master'
A bit more cleanup in the dnssec-keygen manual

See merge request isc-projects/bind9!1678
2019-03-13 23:06:05 -04:00
Tony Finch
acc3fa04b7 A bit more cleanup in the dnssec-keygen manual
Remove another remnant of shared secret HMAC-MD5 support.

Explain that with currently recommended setups DNSKEY records are
inserted automatically, but you can still use $INCLUDE in other cases.
2019-03-14 13:22:01 +11:00
Mark Andrews
48a7efafc2 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1681
2019-03-13 21:55:21 -04:00
Mark Andrews
b9a276064b placeholder 2019-03-14 12:53:18 +11:00
Mark Andrews
62ff4bcc07 Merge branch '936-missing-unlocks-in-sdlz-c' into 'master'
Resolve "Missing unlocks in sdlz.c"

Closes #936

See merge request isc-projects/bind9!1677
2019-03-13 17:56:14 -04:00
Mark Andrews
32f2ae3791 add CHANGES 2019-03-14 08:55:35 +11:00
Mark Andrews
ff8bf617e7 add missing MAYBE_UNLOCK 2019-03-13 10:51:56 +11:00
Evan Hunt
7ef3bb20cf Merge branch '881-cleanup-ecs' into 'master'
clean up ECS before reusing clients

Closes #881

See merge request isc-projects/bind9!1675
2019-03-12 16:56:26 -04:00
Evan Hunt
9463a781fb CHANGES 2019-03-12 13:38:06 -07:00
Witold Kręcicki
aa3da7a232 Clean up client->ecs when we're done with the request. 2019-03-12 13:35:28 -07:00
Evan Hunt
44c8202b0c Merge branch '834-fix-race-in-fctx-cancel' into 'master'
fix race in socket code

Closes #834

See merge request isc-projects/bind9!1671
2019-03-12 14:35:57 -04:00
Witold Kręcicki
50f6054294 CHANGES 2019-03-12 11:04:09 -07:00
Witold Kręcicki
56183a3917 Fix a race in fctx_cancelquery.
When sending an udp query (resquery_send) we first issue an asynchronous
isc_socket_connect and increment query->connects, then isc_socket_sendto2
and increment query->sends.
If we happen to cancel this query (fctx_cancelquery) we need to cancel
all operations we might have issued on this socket. If we are under very high
load the callback from isc_socket_connect (resquery_udpconnected) might have
not yet been fired. In this case we only cancel the CONNECT event on socket,
and ignore the SEND that's waiting there (as there is an `else if`).
Then we call dns_dispatch_removeresponse which kills the dispatcher socket
and calls isc_socket_close - but if system is under very high load, the send
we issued earlier might still not be complete - which triggers an assertion
because we're trying to close a socket that's still in use.

The fix is to always check if we have incomplete sends on the socket and cancel
them if we do.
2019-03-12 18:42:35 +01:00
Michał Kępień
3365064fb6 Merge branch 'michal/silence-a-perl-warning-output-by-stop.pl' into 'master'
Silence a Perl warning output by stop.pl

See merge request isc-projects/bind9!1649
2019-03-12 04:04:12 -04:00
Michał Kępień
91e5a99b9b Silence a Perl warning output by stop.pl
On Unix systems, the CYGWIN environment variable is not set at all when
BIND system tests are run.  If a named instance crashes on shutdown or
otherwise fails to clean up its pidfile and the CYGWIN environment
variable is not set, stop.pl will print an uninitialized value warning
on standard error.  Prevent this by using defined().
2019-03-12 08:42:48 +01:00
Mark Andrews
985d9d9c84 Merge branch 'ifconfig.sh-anywhere' into 'master'
Allow ifconfig to be called from any directory

See merge request isc-projects/bind9!1563
2019-03-11 23:08:52 -04:00
Petr Menšík
38301052e1 Allow ifconfig to be called from any directory
ifconfig.sh depends on config.guess for platform guessing. It uses it to
choose between ifconfig or ip tools to configure interfaces. If
system-wide automake script is installed and local was not found, use
platform guess. It should work well on mostly any sane platform. Still
prefers local guess, but passes when if cannot find it.
2019-03-11 22:19:49 -04:00
Michał Kępień
faa0de1349 Merge branch '928-stabilize-delzsk.example-zone-checks' into 'master'
Stabilize "delzsk.example" zone checks

See merge request isc-projects/bind9!1640
2019-03-11 08:28:13 -04:00
Michał Kępień
e02de04e97 Stabilize "delzsk.example" zone checks
When a zone is converted from NSEC to NSEC3, the private record at zone
apex indicating that NSEC3 chain creation is in progress may be removed
during a different (later) zone_nsec3chain() call than the one which
adds the NSEC3PARAM record.  The "delzsk.example" zone check only waits
for the NSEC3PARAM record to start appearing in dig output while private
records at zone apex directly affect "rndc signing -list" output.  This
may trigger false positives for the "autosign" system test as the output
of the "rndc signing -list" command used for checking ZSK deletion
progress may contain extra lines which are not accounted for.  Ensure
the private record is removed from zone apex before triggering ZSK
deletion in the aforementioned check.

Also future-proof the ZSK deletion progress check by making it only look
at lines it should care about.
2019-03-11 13:02:54 +01:00
Michał Kępień
5ac5d90620 Merge branch '129-dnssec-system-test-tweaks' into 'master'
"dnssec" system test tweaks

Closes #129

See merge request isc-projects/bind9!1545
2019-03-11 08:02:06 -04:00
Mark Andrews
dee1f1a498 ${ttl} must exist and be non null 2019-03-11 12:04:44 +01:00
Michał Kępień
a85cc41486 Make ANSWER TTL capping checks stricter
For checks querying a named instance with "dnssec-accept-expired yes;"
set, authoritative responses have a TTL of 300 seconds.  Assuming empty
resolver cache, TTLs of RRsets in the ANSWER section of the first
response to a given query will always match their authoritative
counterparts.  Also note that for a DNSSEC-validating named resolver,
validated RRsets replace any existing non-validated RRsets with the same
owner name and type, e.g. cached from responses received while resolving
CD=1 queries.  Since TTL capping happens before a validated RRset is
inserted into the cache and RRSIG expiry time does not impose an upper
TTL bound when "dnssec-accept-expired yes;" is set and, as pointed out
above, the original TTLs of the relevant RRsets equal 300 seconds, the
RRsets in the ANSWER section of the responses to expiring.example/SOA
and expired.example/SOA queries sent with CD=0 should always be exactly
120 seconds, never a lower value.  Make the relevant TTL checks stricter
to reflect that.
2019-03-11 12:04:42 +01:00
Michał Kępień
8baf859063 Relax ADDITIONAL TTL capping checks
Always expecting a TTL of exactly 300 seconds for RRsets found in the
ADDITIONAL section of responses received for CD=1 queries sent during
TTL capping checks is too strict since these responses will contain
records cached from multiple DNS messages received during the resolution
process.

In responses to queries sent with CD=1, ns.expiring.example/A in the
ADDITIONAL section will come from a delegation returned by ns2 while the
ANSWER section will come from an authoritative answer returned by ns3.
If the queries to ns2 and ns3 happen at different Unix timestamps,
RRsets cached from the older response will have a different TTL by the
time they are returned to dig, triggering a false positive.

Allow a safety margin of 60 seconds for checks inspecting the ADDITIONAL
section of responses to queries sent with CD=1 to fix the issue.  A
safety margin this large is likely overkill, but it is used nevertheless
for consistency with similar safety margins used in other TTL capping
checks.
2019-03-11 12:04:42 +01:00
Michał Kępień
a597bd52a6 Fix message section checked in a TTL capping test
Commit c032c54dda inadvertently changed
the DNS message section inspected by one of the TTL capping checks from
ADDITIONAL to ANSWER, introducing a discrepancy between that check's
description and its actual meaning.  Revert to inspecting the ADDITIONAL
section in the aforementioned check.
2019-03-11 12:04:42 +01:00
Michał Kępień
9a36a1bba3 Fix NTA-related races
Changes introduced by commit 6b8e4d6e69
were incomplete as not all time-sensitive checks were updated to match
revised "nta-lifetime" and "nta-recheck" values.  Prevent rare false
positives by updating all NTA-related checks so that they work reliably
with "nta-lifetime 12s;" and "nta-recheck 9s;".  Update comments as well
to prevent confusion.
2019-03-11 12:04:42 +01:00
Mark Andrews
8555fe8b4b Merge branch '803-add-return-code-to-allow-dlz-s-allowzonexfr-to-fall-back-to-to-the-view-s-allow-transfer-setting' into 'master'
Resolve "Add return code to allow dlz's allowzonexfr to fall back to to the view's allow-transfer setting."

Closes #803

See merge request isc-projects/bind9!1292
2019-03-10 23:42:17 -04:00
Evan Hunt
7cc241ca39 CHANGES 2019-03-11 14:27:13 +11:00
Evan Hunt
e2062879c1 test the use of the view ACL in DLZ 2019-03-11 14:27:13 +11:00
Mark Andrews
a520662ed4 allow dlz to signal that the view's transfer acl should be used 2019-03-11 14:27:13 +11:00
Ondřej Surý
76085b7e9c Merge branch 'ondrej/restore-flockfile-check' into 'master'
Restore missing check for flockfile and getc_unlocked

See merge request isc-projects/bind9!1653
2019-03-08 15:34:16 -05:00
Ondřej Surý
7eea756858 Restore missing check for flockfile and getc_unlocked 2019-03-08 21:20:20 +01:00
Ondřej Surý
a6bb44493c Merge branch '4-use-autoconf-check-for-lfs-support' into 'master'
autoconf has native support for detecting LFS support

See merge request isc-projects/bind9!1652
2019-03-08 15:14:57 -05:00
Ondřej Surý
0eff9a184a Enable LFS using standard autoconf macros 2019-03-08 20:29:34 +01:00
Ondřej Surý
5caf126267 Merge branch '4-set-crlf-in-all-vcxproj-files' into 'master'
Set crlf in all *.vcxproj.* files

See merge request isc-projects/bind9!1651
2019-03-08 12:05:42 -05:00
Ondřej Surý
a04a390195 Convert *.vcxproj.user to CRLF line endings 2019-03-08 18:01:48 +01:00
Ondřej Surý
1b53e939ed Set crlf in all *.vcxproj.* files 2019-03-08 17:59:44 +01:00
Ondřej Surý
d49e9181a0 Merge branch '4-autoinclude-config.h' into 'master'
Use compiler directive to include config.h as a first file

See merge request isc-projects/bind9!1650
2019-03-08 11:39:20 -05:00
Ondřej Surý
2621db706e Update dev documentation to explicitly mention that #include <config.h> should not be used 2019-03-08 17:14:38 +01:00
Ondřej Surý
c2637c8429 Use ForcedIncludeFiles directive to include config.h everywhere automatically 2019-03-08 17:14:38 +01:00
Ondřej Surý
a96393e837 Don't generate #include <config.h> line from mksymtbl.pl 2019-03-08 15:15:05 +01:00
Ondřej Surý
ccfe54f541 Remove config.h check from util/checklibs.sh 2019-03-08 15:15:05 +01:00
Ondřej Surý
1b25d8a0ca Remove explicit '#include <config.h>' from the header files (the include should not have been there in the first place) 2019-03-08 15:15:05 +01:00
Ondřej Surý
78d0cb0a7d Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
Ondřej Surý
0b9f7f8a38 Add semantic patch to remove occurences of '#include <config.h>' 2019-03-08 15:15:05 +01:00
Ondřej Surý
15c46a397e Use -include directive to always include config.h 2019-03-08 14:33:49 +01:00
Michał Kępień
893c65ce3f Merge branch 'michal/fix-regex-used-for-mangling-druz-dnskey' into 'master'
Fix regex used for mangling druz/DNSKEY (in the "dlv" system test)

See merge request isc-projects/bind9!1641
2019-03-08 08:08:55 -05:00
Michał Kępień
fd13fef299 Fix regex used for mangling druz/DNSKEY
During "dlv" system test setup, the "sed" regex used for mangling the
DNSKEY RRset for the "druz" zone does not include the plus sign ("+"),
which may:

  - cause the replacement to happen near the end of DNSKEY RDATA, which
    can cause the latter to become an invalid Base64 string,

  - prevent the replacement from being performed altogether.

Both cases prevent the "dlv" system test from behaving as intended and
may trigger false positives.  Add the missing character to the
aforementioned regex to ensure the replacement is always performed on
bytes 10-25 of DNSKEY RDATA.
2019-03-08 13:47:13 +01:00
Michał Kępień
570f56ab77 Merge branch '925-make-delv-use-os-supplied-ephemeral-port-range' into 'master'
Make delv use OS-supplied ephemeral port range

Closes #925

See merge request isc-projects/bind9!1611
2019-03-08 07:46:07 -05:00
Michał Kępień
bf98324956 Add CHANGES entry
5180.	[bug]		delv now honors the operating system's preferred
			ephemeral port range. [GL #925]
2019-03-08 13:13:32 +01:00
Michał Kępień
ada6846a10 Make delv use OS-supplied ephemeral port range
Make delv honor the operating system's preferred ephemeral port range
instead of always using the default 1024-65535 range for outgoing
messages.
2019-03-08 13:13:32 +01:00
Mark Andrews
99138abe38 Merge branch 'u/fanf2/sectypes' into 'master'
cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate

See merge request isc-projects/bind9!1498
2019-03-08 03:26:18 -05:00
Tony Finch
0f219714e1 cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate
Use them in structs for various rdata types where they are missing.
This doesn't change the structs since we are replacing explicit
uint8_t field types with aliases for uint8_t.

Use dns_dsdigest_t in library function arguments.

Improve dnssec-cds with these more specific types.
2019-03-08 18:37:50 +11:00
Mark Andrews
f285dd9a08 Merge branch 'marka-define-path-max' into 'master'
#include <limits.h> for PATH_MAX, define if not found

See merge request isc-projects/bind9!1635
2019-03-08 02:21:46 -05:00
Mark Andrews
1fc7be36eb #include <limits.h> for PATH_MAX, define if not found 2019-03-08 17:15:01 +11:00
Evan Hunt
ce6f3d4bb4 Merge branch 'each-silence-warning' into 'master'
silence a warning about potential snprintf overrun

See merge request isc-projects/bind9!1558
2019-03-08 00:46:17 -05:00
Evan Hunt
7f26cad247 silence a warning about potential snprintf overrun 2019-03-08 00:27:49 -05:00
Evan Hunt
3fe7acaa6f Merge branch '902-hang-when-unexpected-errno-encountered-during-log-rename' into 'master'
Resolve "Hang when unexpected errno encountered during log rename"

Closes #902

See merge request isc-projects/bind9!1567
2019-03-08 00:22:35 -05:00
Mark Andrews
435ae2f29a Handle EDQUOT and ENOSPC errors 2019-03-07 21:02:48 -08:00
Evan Hunt
fced495d47 Merge branch '884-patches-to-review-3' into 'master'
fix the use of dns_wildcardname as an optimisation in DLZ

Closes #884

See merge request isc-projects/bind9!1532
2019-03-07 23:18:49 -05:00
Mark Andrews
cb32cd98bd fix the use of dns_wildcardname as an optimisation in DLZ 2019-03-07 19:59:29 -08:00
Evan Hunt
c37e78539c Merge branch 'ckb-statistics-test-nit' into 'master'
the wrong variable was used to count the test cases in one place.

See merge request isc-projects/bind9!1625
2019-03-07 20:32:49 -05:00
Curtis Blackburn
4f60a84e34 the wrong variable was used to count the test cases in one place. 2019-03-07 20:15:14 -05:00
Mark Andrews
dad333b644 Merge branch '927-teach-clang-that-_fail-does-not-return' into 'master'
Resolve "teach clang that _fail() does not return."

Closes #927

See merge request isc-projects/bind9!1621
2019-03-07 20:11:53 -05:00
Mark Andrews
3f2b7e1006 add noreturn attribute 2019-03-07 16:45:04 +11:00
Evan Hunt
a4c60a9f08 Merge branch '865-option-to-disable-information-leak-on-rpz-rewrites-isc-support-14178' into 'master'
Resolve "Option to disable information leak on RPZ rewrites [ISC-support #14178]"

Closes #865

See merge request isc-projects/bind9!1514
2019-03-07 00:16:42 -05:00
Mark Andrews
89234643e1 CHANGES, release note 2019-03-06 20:48:34 -08:00
Evan Hunt
aeed047495 disable a previously broken test under dnsrps 2019-03-06 20:48:30 -08:00
Mark Andrews
d1fa8be611 add the ability to control whether SOA records are added response-policy modified answers 2019-03-06 20:47:28 -08:00
Mark Andrews
3d512a7e26 Merge branch '926-statschannel-system-tests-fails-json-only-no-libxml' into 'master'
Resolve "statschannel system tests fails json only (no libxml)"

Closes #926

See merge request isc-projects/bind9!1614
2019-03-06 18:42:46 -05:00
Mark Andrews
5bc06a0a11 add CHANGES 2019-03-07 10:25:15 +11:00
Mark Andrews
a9c47414b3 remove dependancy on libxml 2019-03-07 10:09:33 +11:00
Evan Hunt
8b637a1d2f Merge branch '882-zone-data-cannot-be-loaded-with-dnssec-coverage' into 'master'
Resolve "Zone data cannot be loaded with dnssec-coverage"

Closes #882

See merge request isc-projects/bind9!1522
2019-03-06 17:35:05 -05:00
Evan Hunt
57e44efc73 add CHANGES 2019-03-06 14:22:58 -08:00
Mark Andrews
ec3d830bc5 explicitly convert byte to string 2019-03-06 14:17:45 -08:00
Evan Hunt
918fabb65f Merge branch 'u/fanf2/man-dnssec-keygen' into 'master'
cleanup dnssec-keygen manual page

See merge request isc-projects/bind9!1557
2019-03-06 17:13:38 -05:00
Tony Finch
1954f8d2bf cleanup dnssec-keygen manual page
Alphabetize options and synopsis; remove spurious -z from synopsis;
remove remnants of deprecated -k option; remove mention of long-gone
TSIG support; refer to -T KEY in options that are only relevant to
pre-RFC3755 DNSSEC; remove unnecessary -n ZONE from the example, and
add a -f KSK example.
2019-03-06 13:24:56 -08:00
Evan Hunt
52d90da41e Merge branch '874-fix-race-in-socket-code' into 'master'
Fix a race in socket code

Closes #874

See merge request isc-projects/bind9!1590
2019-03-06 16:19:10 -05:00
Evan Hunt
6d24292830 CHANGES 2019-03-06 12:56:24 -08:00
Witold Kręcicki
b57a38ae43 Fix a race in socket code when internal_{accept, send, receive} is called
from event loop on an socket and, in the meantime, someone has closed this
socket.
2019-03-06 12:56:11 -08:00
Evan Hunt
0e67a73bdf Merge branch 'michal/log-plugin-unloading-at-debug-level' into 'master'
Log plugin unloading at debug level

See merge request isc-projects/bind9!1608
2019-03-06 15:30:40 -05:00
Michał Kępień
af4b81f944 Log plugin unloading at debug level
During server reconfiguration, plugin instances set up for the old views
are unloaded very close to the end of the whole process, after new
plugin instances are set up.  As the log message announcing plugin
unloading is emitted at the default "info" level, the user might be
misled into thinking that it is the new plugin instances that are being
unloaded for some reason, particularly because all other messages logged
at the "info" level around the same time inform about setting things up
rather than tearing them down.  Since no distinction is currently made
between destroying a view due to reconfiguration and due to a shutdown
in progress, there is no easy way to vary the contents of the log
message depending on circumstances.  Since this message is not a
particularly critical one, demote it to debug level to prevent
confusion.
2019-03-06 15:19:07 -05:00
Michał Kępień
68ff5f0ebd Merge branch '905-make-nsupdate-use-os-supplied-ephemeral-port-range' into 'master'
Make nsupdate use OS-supplied ephemeral port range

Closes #905

See merge request isc-projects/bind9!1569
2019-03-06 08:27:39 -05:00
Michał Kępień
0e64948274 Add CHANGES entry
5172.	[bug]		nsupdate now honors the operating system's preferred
			ephemeral port range. [GL #905]
2019-03-06 14:02:12 +01:00
Michał Kępień
06f582f23e Make nsupdate use OS-supplied ephemeral port range
Make nsupdate honor the operating system's preferred ephemeral port
range instead of always using the default 1024-65535 range for outgoing
messages.
2019-03-06 14:01:24 +01:00
Evan Hunt
960ddd5381 Merge branch '878-install-named-plugins-into-a-separate-directory' into 'master'
Install named plugins into a separate directory

Closes #878

See merge request isc-projects/bind9!1512
2019-03-05 19:44:49 -05:00
Michał Kępień
d2c960cfc2 Add CHANGES entry
5161.	[func]		named plugins are now installed into a separate
			directory.  Supplying a filename (a string without path
			separators) in a "plugin" configuration stanza now
			causes named to look for that plugin in that directory.
			[GL #878]
2019-03-05 16:06:25 -08:00
Michał Kępień
cba155154b Add -c to usage message for named-checkconf
Add the -c command line option to the usage message for named-checkconf
as it is not present there despite being documented.
2019-03-05 16:06:25 -08:00
Michał Kępień
1a9fc624ca Look for named plugins in ${libdir}/named
When the "library" part of a "plugin" configuration stanza does not
contain at least one path separator, treat it as a filename and assume
it is a name of a shared object present in the named plugin installation
directory.  Absolute and relative paths can still be used and will be
used verbatim.  Get the full path to a plugin before attempting to
check/register it so that all relevant log messages include the same
plugin path (apart from the one logged when the full path cannot be
determined).
2019-03-05 16:06:25 -08:00
Michał Kępień
d181c28c60 Add ns_plugin_expandpath()
Implement a helper function which, given an input string:

  - copies it verbatim if it contains at least one path separator,
  - prepends the named plugin installation directory to it otherwise.

This function will allow configuration parsing code to conveniently
determine the full path to a plugin module given either a path or a
filename.

While other, simpler ways exist for making sure filenames passed to
dlopen() cause the latter to look for shared objects in a specific
directory, they are very platform-specific.  Using full paths is thus
likely the most portable and reliable solution.

Also added unit tests for ns_plugin_expandpath() to ensure it behaves
as expected for absolute paths, relative paths, and filenames, for
various target buffer sizes.

(Note: plugins share a directory with named on Windows; there is no
default plugin path. Therefore the source path is copied to the
destination path with no modification.)
2019-03-05 16:06:24 -08:00
Michał Kępień
c527b7fd5c Install named plugins into a separate directory
Installing named plugins into ${libdir} clutters the latter and is not
in line with common filesystem conventions.  Instead, install named
plugins into a separate directory, ${libdir}/named.
2019-03-05 15:53:04 -08:00
Evan Hunt
a1c9db1baa Merge branch '909-add-explicit-link-check-for-libatomic' into 'master'
Add explicit check for libatomic to fix configure step on NetBSD

Closes #909

See merge request isc-projects/bind9!1586
2019-03-05 18:17:26 -05:00
Ondřej Surý
9a16e0a5ae Add information about NetBSD 6 compilation on i386 2019-03-05 14:27:18 -08:00
Ondřej Surý
fcade0610f Add explicit check for libatomic 2019-03-05 14:24:18 -08:00
Evan Hunt
db7a7357a6 Merge branch '884-patches-to-review-4' into 'master'
dlz filesystem driver failed to properly detect period at end of filename.

Closes #884

See merge request isc-projects/bind9!1533
2019-03-05 17:18:47 -05:00
Mark Andrews
c9dc59eb90 properly detect period as last character in filename 2019-03-05 13:50:22 -08:00
Evan Hunt
648aef129d Merge branch 'michal/disable-servfail-cache-for-ns5-in-the-mkeys-system-test' into 'master'
Disable SERVFAIL cache for ns5 in the "mkeys" system test

See merge request isc-projects/bind9!1585
2019-03-05 16:23:59 -05:00
Michał Kępień
7c6bff3c4e Disable SERVFAIL cache for ns5 in the "mkeys" system test
The "check key refreshes are resumed after root servers become
available" check may trigger a false positive for the "mkeys" system
test if the second example/TXT query sent by dig is received by ns5 less
than a second after it receives a REFUSED response to the upstream query
it sends to ns1 in order to resolve the first example/TXT query sent by
dig.  Since that REFUSED response from ns1 causes ns5 to return a
SERVFAIL answer to dig, example/TXT is added to the SERVFAIL cache,
which is enabled by default with a TTL of 1 second.  This in turn may
cause ns5 to return a cached SERVFAIL response to the second example/TXT
query sent by dig, i.e. make ns5 not perform full query processing as
expected by the check.

Since the primary purpose of the check in question is to ensure that key
refreshes are resumed once initially unavailable root servers become
available, the optimal solution appears to be disabling SERVFAIL cache
for ns5 as doing that still allows the check to fulfill its purpose and
it is arguably more prudent than always sleeping for 1 second.
2019-03-05 11:48:26 -08:00
Evan Hunt
ea95d85091 Merge branch '889-improve-clang-cmocka-interaction' into 'master'
Resolve "Improve clang/cmocka interaction."

Closes #889

See merge request isc-projects/bind9!1542
2019-03-05 13:34:30 -05:00
Mark Andrews
cb913177ae improve clang / cmocka integration 2019-03-05 10:20:29 -08:00
Mark Andrews
12a8574aea Merge branch '919-add-win32util-configure-file-list-check-to-ci' into 'master'
Resolve "Add win32util/Configure file list check to CI"

Closes #919

See merge request isc-projects/bind9!1594
2019-03-05 01:28:46 -05:00
Mark Andrews
442421906b remove '..\\bin\\tests\\system\\dlz\\prereq.sh' from win32util/Configure 2019-03-05 17:11:20 +11:00
Mark Andrews
c3dd8bb9f0 add util/check-win32util-configure to precheck 2019-03-05 17:11:20 +11:00
Matthijs Mekking
bbeff24049 Merge branch 'matthijs/more-clean.sh-related-cleanups' into 'master'
More clean.sh-related cleanups

See merge request isc-projects/bind9!1579
2019-03-04 10:54:16 -05:00
Matthijs Mekking
e410803919 Ensure all system tests run clean.sh from setup.sh
For consistency between all system tests, add missing setup.sh scripts
for tests which do not have one yet and ensure every setup.sh script
calls its respective clean.sh script.
2019-03-04 16:26:06 +01:00
Matthijs Mekking
c64ed484c8 Only perform test cleanups in clean.sh scripts
Temporary files created by a given system test should be removed by its
clean.sh script, not its setup.sh script.  Remove redundant "rm"
invocations from setup.sh scripts.  Move required "rm" invocations from
setup.sh scripts to their corresponding clean.sh scripts.
2019-03-04 16:26:06 +01:00
Mark Andrews
7f6cc1b405 Merge branch 'feature/featuretest-dlz' into 'master'
Test dlz support in feature-test

See merge request isc-projects/bind9!1587
2019-03-03 22:04:37 -05:00
Mark Andrews
5f125df462 add CHANGES 2019-03-04 14:03:23 +11:00
Mark Andrews
4988367b53 run autoheader and autoconf 2019-03-04 09:37:42 +11:00
Petr Menšík
759a7b4ce3 Support DLZ filesystem detection in feature-test
Do not use variable from configure to detect the feature.
2019-03-01 17:41:06 +01:00
Michał Kępień
03dcdb88a2 Merge branch 'michal/fix-ip-regex-used-in-the-resolver-system-test' into 'master'
Fix IP regex used in the "resolver" system test

See merge request isc-projects/bind9!1568
2019-03-01 01:55:42 -05:00
Michał Kępień
70ae48e5cb Fix IP regex used in the "resolver" system test
If dots are not escaped in the "1.2.3.4" regular expressions used for
checking whether IP address 1.2.3.4 is present in the tested resolver's
answers, a COOKIE that matches such a regular expression will trigger a
false positive for the "resolver" system test.  Properly escape dots in
the aforementioned regular expressions to prevent that from happening.
2019-03-01 01:32:54 -05:00
Evan Hunt
ccdeacf45e Merge branch '901-empty-any' into 'master'
handle empty ANY query responses

Closes #901

See merge request isc-projects/bind9!1580
2019-02-28 19:05:44 -05:00
Evan Hunt
4ad0bc38e9 CHANGES, release notes 2019-02-28 15:00:38 -08:00
Evan Hunt
c6939f0bd4 test correct occlusion of DNSSEC records 2019-02-28 15:00:38 -08:00
Evan Hunt
3e74c7e5ff fix crash in query_respond_any() from all records being hidden
in query_respond_any(), the assumption had previously been made that it
was impossible to get past iterating the node with a return value of
ISC_R_NOMORE but not have found any records, unless we were searching
for RRSIG or SIG. however, it is possible for other types to exist but
be hidden, such as when the zone is transitioning from insecure to
secure and DNSSEC types are encountered, and this situation could
trigger an assertion.  removed the assertion and reorganized the code.
2019-02-28 13:55:47 -08:00
Michał Kępień
cdbae0013b Merge branch 'michal/do-not-include-conf.sh-from-ttl-clean.sh' into 'master'
Do not include conf.sh from ttl/clean.sh

See merge request isc-projects/bind9!1564
2019-02-28 07:42:42 -05:00
Michał Kępień
6602848460 Do not include conf.sh from ttl/clean.sh
Including $SYSTEMTESTTOP/conf.sh from a system test's clean.sh script is
not needed for anything while it causes an error message to be printed
out when "./configure" is run, as "make clean" is invoked at the end.
Remove the offending line to prevent the error from occurring.
2019-02-28 13:17:01 +01:00
Michał Kępień
d571b33468 Merge branch 'michal/call-clean.sh-from-all-relevant-setup.sh-scripts' into 'master'
Call clean.sh from all relevant setup.sh scripts

See merge request isc-projects/bind9!1565
2019-02-28 07:11:00 -05:00
Michał Kępień
a077a3ae8a Call clean.sh from all relevant setup.sh scripts
For all system tests utilizing named instances, call clean.sh from each
test's setup.sh script in a consistent way to make sure running the same
system test multiple times using run.sh does not trigger false positives
caused by stale files created by previous runs.

Ideally we would just call clean.sh from run.sh, but that would break
some quirky system tests like "rpz" or "rpzrecurse" and being consistent
for the time being does not hurt.
2019-02-28 12:34:10 +01:00
Matthijs Mekking
a111c8d739 Merge branch '813-matthijs-failure-loading-rpz' into 'master'
Resolve "Problems after failure of loading rpz [ISC-support #14002]"

Closes #813

See merge request isc-projects/bind9!1507
2019-02-22 09:05:46 -05:00
Matthijs Mekking
e5565808e4 Update CHANGES 2019-02-22 14:00:01 +01:00
Matthijs Mekking
6ed14eff25 Unregister RPZ CATZ db cbs when zone load fails
In case when a zone fails to load because the file does not exist
or is malformed, we should not run the callback that updates the
zone database when the load is done.  This is achieved by
unregistering the callbacks if at zone load end if the result
indicates something else than success.
2019-02-22 13:59:10 +01:00
Matthijs Mekking
84700f9783 Update copyrights 2019-02-22 13:59:10 +01:00
Matthijs Mekking
ce5476acf0 Add test for rpz zone load fail 2019-02-22 13:59:10 +01:00
Matthijs Mekking
6756280242 Remove rpz->db_registered
As pointed out in !813 db_registered is sort of redundant.  It is
set to `true` only in `dns_zone_rpz_enable_db()` right before the
`dns_rpz_dbupdate_callback()` callback is registered.  It is only
required in that callback and it is the only place that the callback
is registered.  Therefore there is no path that that `REQUIRE` can
fail.

The `db_registered` variable is only set to `false` in
`dns_rpz_new_zone`, so it is not like the variable is unset again
later.

The only other place where `db_registered` is checked is in
`rpz_detach()`.  If `true`, it will call
`dns_db_updatenotify_unregister()`.  However if that happens, the
`db_registered` is not set back to `false` thus this implies that
this may happen multiple times.  If called a second time, most
likely the unregister function will return `ISC_R_NOTFOUND`, but
the return value is not checked anyway.  So it can do without the
`db_registered` check.
2019-02-22 13:59:10 +01:00
Matthijs Mekking
2e5e429644 Add curly brackets on if statements 2019-02-22 13:59:10 +01:00
Matthijs Mekking
a490c09121 named crashes on shutdown after load rpz failed
This may happen when loading an RPZ failed and the code path skips
calling dns_db_endload().  The dns_rpz_zone_t object is still kept
marked as having registered db.  So when this object is finally
destroyed in rpz_detach(), this code will incorrectly call
`dns_db_updatenotify_unregister()`:

   if (rpz->db_registered)
     dns_db_updatenotify_unregister(rpz->db,
                                    dns_rpz_dbupdate_callback, rpz);

and trigger this assertion failure:

   REQUIRE(db != NULL);

To fix this, only call `dns_db_updatenotify_unregister()` when
`rpz->db` is not NULL.
2019-02-22 13:59:10 +01:00
Matthijs Mekking
8d392f9093 Make RPZ tests more readable 2019-02-22 13:59:10 +01:00
Matthijs Mekking
9ecdb292c4 Add README to RPZ tests 2019-02-22 13:59:10 +01:00
Mark Andrews
f9b50a4019 Merge branch '892-fix-redirect-name' into 'master'
use qname in redirect2

Closes #892

See merge request isc-projects/bind9!1561
2019-02-22 00:42:34 -05:00
Mark Andrews
ad785e4f93 add CHANGES 2019-02-22 16:25:34 +11:00
Mark Andrews
8758d36a5e use client->query.qname 2019-02-22 00:04:52 -05:00
Evan Hunt
138268b78a Merge branch 'prep-915' into 'master'
documentation changes setting up 9.15 development branch

See merge request isc-projects/bind9!1560
2019-02-21 21:03:19 -05:00
Evan Hunt
efb0d1e83d documentation changes setting up 9.15 development branch 2019-02-21 16:42:17 -08:00
Evan Hunt
d7b82380ff Merge branch 'fix-changes' into security-master 2019-02-20 19:44:40 -08:00
Evan Hunt
15b18d8a38 remove "released" line (retained in v9_14) so check-changes won't complain 2019-02-20 19:44:40 -08:00
Evan Hunt
8514320271 Merge branch 'security-dlz-axfr-deny-broken' into security-master
denied axfr requests were not effective for writable DLZ zones

See merge request isc-private/bind9!57
2019-02-20 19:44:39 -08:00
Mark Andrews
821f917db8 add CHANGES and release notes entries 2019-02-20 19:44:38 -08:00
Mark Andrews
a9307de85e denied axfr requests were not effective for writable DLZ zones 2019-02-20 19:44:38 -08:00
Evan Hunt
5e7f1a8d67 Merge 'keytag-memleak' into security-master 2019-02-20 19:44:37 -08:00
Evan Hunt
747035dcc5 fix test error 2019-02-20 19:44:37 -08:00
Mark Andrews
9ae991751c add CHANGES and release note entries 2019-02-20 19:44:37 -08:00
Mark Andrews
fe4810f1f8 check that multiple KEY-TAG trust-anchor-telemetry options don't leak memory 2019-02-20 19:44:36 -08:00
Mark Andrews
35025b6e88 silently ignore additional keytag options 2019-02-20 19:44:36 -08:00
Evan Hunt
6f1ac89c1a Merge 'managed-key-assert' into security-master 2019-02-20 19:44:35 -08:00
Evan Hunt
41a851861e Merge 'managed-key-assert' into security-master 2019-02-20 19:44:34 -08:00
Evan Hunt
3022633d79 use algorithm 255 for both unsupported keys 2019-02-20 19:44:34 -08:00
Matthijs Mekking
e7c12bffbd CHANGES, notes 2019-02-20 19:44:33 -08:00
Matthijs Mekking
f09352d20a Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key.
2019-02-20 19:44:33 -08:00
Matthijs Mekking
38c2bdba0a Add tests for mkeys with unsupported algorithm
These tests check if a key with an unsupported algorithm in
managed-keys is ignored and when seeing an algorithm rollover to
an unsupported algorithm, the new key will be ignored too.
2019-02-20 19:44:33 -08:00
Matthijs Mekking
235a64a5a4 Don't free key in compute_tag in case of failure
If `dns_dnssec_keyfromrdata` failed we don't need to call
`dst_key_free` because no `dstkey` was created.  Doing so
nevertheless will result in an assertion failure.

This can happen if the key uses an unsupported algorithm.
2019-02-20 19:44:32 -08:00
Evan Hunt
91550e21cd Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1551
2019-02-20 21:41:58 -05:00
Evan Hunt
5893689592 placeholder 2019-02-20 18:41:26 -08:00
Evan Hunt
3d1bb8038e Merge branch 'start-915' into 'master'
9.15.0-dev

See merge request isc-projects/bind9!1550
2019-02-20 21:23:51 -05:00
Evan Hunt
040c23e3d7 9.15.0-dev 2019-02-20 18:22:54 -08:00
Evan Hunt
f4ade46f4a Merge branch '428-remove-contrib-sdb' into 'master'
remove contrib/sdb

Closes #428

See merge request isc-projects/bind9!1501
2019-02-19 20:47:55 -05:00
Evan Hunt
bcc2fd679b CHANGES 2019-02-19 17:19:40 -08:00
Evan Hunt
c79e2f12fe remove contrib/sdb
removed the SDB databases in contrib/sdb as they hadn't been
maintained in some time, and were no longer able to link to named
without modification.  also:

- cleaned up contrib/README, which still referred to contrib
  subdirectores that were removed already, and linked to an obsolete URL.
- removed references to sdb in doc/misc/roadmap and doc/misc/sdb.
2019-02-19 17:19:40 -08:00
Mark Andrews
d27f41cb7f Merge branch '884-patches-to-review' into 'master'
Correct errno to result translation

Closes #884

See merge request isc-projects/bind9!1519
2019-02-19 18:11:42 -05:00
Mark Andrews
a0c0d76029 add CHANGES 2019-02-20 09:44:56 +11:00
Mark Andrews
218ce34e7d correct errno to result translation 2019-02-20 09:43:16 +11:00
Mark Andrews
fa79f4b899 Merge branch '836-building-fails-in-build-subdirectory-when-dnstap-is-enabled' into 'master'
Resolve "Building fails in build subdirectory when dnstap is enabled"

Closes #836

See merge request isc-projects/bind9!1510
2019-02-19 17:40:59 -05:00
Mark Andrews
3a21fdf884 add CHANGES 2019-02-20 09:29:07 +11:00
Mark Andrews
c0d4ff5796 teach proto_c to look in the source directory for out of tree builds 2019-02-20 09:27:00 +11:00
Mark Andrews
d76e172480 Merge branch '877-clang-scan-build-redundant-assignments-detected' into 'master'
Remove redundant assignments

Closes #877

See merge request isc-projects/bind9!1513
2019-02-18 18:01:56 -05:00
Mark Andrews
f475dc75b1 remove redundant assignment 2019-02-18 17:40:56 -05:00
Mark Andrews
7b60f6832e silence clang 2019-02-18 17:40:56 -05:00
Mark Andrews
9a9dc4072f declarations before assertions 2019-02-18 17:40:56 -05:00
Mark Andrews
70fab477b1 don't overwrite result 2019-02-18 17:40:56 -05:00
Mark Andrews
63c03cdb2d remove seen_dname 2019-02-18 17:40:56 -05:00
Mark Andrews
a92d281e10 Merge branch '877-clang-scan-build-redundant-assignments-detected-3' into 'master'
Uninitialised reads in dns_tsig_sign after change 5148.

See merge request isc-projects/bind9!1528
2019-02-18 17:39:38 -05:00
Mark Andrews
4938f97c97 record when querytsig is valid 2019-02-18 17:39:08 -05:00
Mark Andrews
0de6a3835f Merge branch '877-clang-scan-build-redundant-assignments-detected-2' into 'master'
decode_NegTokenInit failed to cleanup allocated memory on error.

See merge request isc-projects/bind9!1527
2019-02-18 17:34:50 -05:00
Mark Andrews
7114d16098 fix memory leak 2019-02-19 09:17:03 +11:00
Mark Andrews
d2ca9e79e3 Merge branch '877-clang-scan-build-redundant-assignments-detected-2' into 'master'
Cleanup no longer necessary assignments post refactoring in socket.c

See merge request isc-projects/bind9!1526
2019-02-18 16:14:56 -05:00
Mark Andrews
f87b88e520 remove dead assignments 2019-02-19 08:12:09 +11:00
Mark Andrews
26c0eaf6e0 Merge branch '877-clang-scan-build-redundant-assignments-detected-2' into 'master'
Add missing asserts to socket_test.c and dnstest.c

See merge request isc-projects/bind9!1523
2019-02-18 15:57:46 -05:00
Mark Andrews
76a1c1531a assert result is ISC_R_SUCCESS 2019-02-19 07:57:14 +11:00
Matthijs Mekking
ee6a378fde Merge branch '513-matthijs-update-xfr-logs' into 'master'
Update to !1427:  Make primary's transfer log more detailed

See merge request isc-projects/bind9!1511
2019-02-18 06:33:15 -05:00
Matthijs Mekking
24507abee3 Update to !1427: Make primary's transfer log more detailed 2019-02-18 06:33:15 -05:00
Mark Andrews
7125d1484e Merge branch 'u/fanf2/dnssec-keymgr-man' into 'master'
Improve dnssec-keymgr manual

See merge request isc-projects/bind9!1518
2019-02-17 23:43:26 -05:00
Tony Finch
7ee56e2abd Improve dnssec-keymgr manual
Illustrate the syntax for the policy options, with semicolons.

Explicitly mention the "default" policy.

Fix a few typos and remove some redundant wording.
2019-02-18 14:12:45 +11:00
Evan Hunt
4d4233f637 Merge branch '879-dnssec-checkds-help' into 'master'
Correct path in dnssec-checkds help

Closes #879

See merge request isc-projects/bind9!1515
2019-02-14 15:51:39 -05:00
Petr Menšík
7bd544e795 Correct path in dnssec-checkds help 2019-02-14 15:23:26 +01:00
Michał Kępień
ef9b9035e3 Merge branch '873-do-not-check-sep-bit-for-mirror-zone-trust-anchors' into 'master'
Do not check SEP bit for mirror zone trust anchors

Closes #873

See merge request isc-projects/bind9!1506
2019-02-14 05:21:46 -05:00
Michał Kępień
2b19b8511a Add CHANGES entry
5161.	[bug]		Do not require the SEP bit to be set for mirror zone
			trust anchors. [GL #873]
2019-02-14 11:03:35 +01:00
Michał Kępień
72c201733c Do not check SEP bit for mirror zone trust anchors
When a mirror zone is verified, the 'ignore_kskflag' argument passed to
dns_zoneverify_dnssec() is set to false.  This means that in order for
its verification to succeed, a mirror zone needs to have at least one
key with the SEP bit set configured as a trust anchor.  This brings no
security benefit and prevents zones signed only using keys without the
SEP bit set from being mirrored, so change the value of the
'ignore_kskflag' argument passed to dns_zoneverify_dnssec() to true.
2019-02-14 11:03:35 +01:00
Michał Kępień
724663c165 Merge branch 'michal/improve-stability-of-mirror-zone-tests' into 'master'
Improve stability of mirror zone system tests

See merge request isc-projects/bind9!1505
2019-02-14 04:59:14 -05:00
Michał Kępień
9c611dd999 Prevent races when waiting for log messages
The "mirror" system test checks whether log messages announcing a mirror
zone coming into effect are emitted properly.  However, the helper
functions responsible for waiting for zone transfers and zone loading to
complete do not wait for these exact log messages, but rather for other
ones preceding them, which introduces a possibility of false positives.

This problem cannot be addressed by just changing the log message to
look for because the test still needs to discern between transferring a
zone and loading a zone.

Add two new log messages at debug level 99 (which is what named
instances used in system tests are configured with) that are to be
emitted after the log messages announcing a mirror zone coming into
effect.  Tweak the aforementioned helper functions to only return once
the log messages they originally looked for are followed by the newly
added log messages.  This reliably prevents races when looking for
"mirror zone is now in use" log messages and also enables a workaround
previously put into place in the "mirror" system test to be reverted.
2019-02-14 10:41:56 +01:00
Michał Kępień
2cbf1028e9 Improve reliability of zone verification checks
In the "mirror" system test, ns3 periodically sends trust anchor
telemetry queries to ns1 and ns2.  It may thus happen that for some
non-recursive queries for names inside mirror zones which are not yet
loaded, ns3 will be able to synthesize a negative answer from the cached
records it obtained from trust anchor telemetry responses.  In such
cases, NXDOMAIN responses will be sent with the root zone SOA in the
AUTHORITY section.  Since the root zone used in the "mirror" system test
has the same serial number as ns2/verify.db.in and zone verification
checks look for the specified serial numbers anywhere in the answer, the
test could be broken if different zone names were used.

The +noauth dig option could be used to address this weakness, but that
would prevent entire responses from being stored for later inspection,
which in turn would hamper troubleshooting test failures.  Instead, use
a different serial number for ns2/verify.db.in than for any other zone
used in the "mirror" system test and check the number of records in the
ANSWER section of each response.
2019-02-14 10:41:56 +01:00
Michał Kępień
46480a4b47 Fix serial number used in zone verification checks
Due to the way the "mirror" system test is set up, it is impossible for
the "verify-unsigned" and "verify-untrusted" zones to contain any serial
number other than the original one present in ns2/verify.db.in.  Thus,
using presence of a different serial number in the SOA records of these
zones as an indicator of problems with mirror zone verification is
wrong.  Look for the original zone serial number instead as that is the
one that will be returned by ns3 if one of the aforementioned zones is
successfully verified.
2019-02-14 10:41:56 +01:00
Mark Andrews
3c47622fe9 Merge branch '871-add-a-ci-check-for-missing-prereq.sh-scripts' into 'master'
Add a CI check for missing prereq.sh scripts

Closes #871

See merge request isc-projects/bind9!1494
2019-02-11 16:48:12 -05:00
Mark Andrews
74c1c37563 add util/check-ans-prereq to precheck 2019-02-12 08:26:42 +11:00
Mark Andrews
ec2ecffef1 add check-ans-prereq 2019-02-12 08:26:42 +11:00
Evan Hunt
6537d0a1e2 Merge branch '872-dlz-ldap-dname' into 'master'
added DNAME support to DLZ LDAP schema, and fixed a DLZ compile error

Closes #872

See merge request isc-projects/bind9!1502
2019-02-10 15:07:38 -05:00
Evan Hunt
2e3b5db195 added DNAME support to DLZ LDAP schema, and fixed a DLZ compile error
Thanks to Roland Gruber for the schema contribution.
2019-02-10 11:49:01 -08:00
Evan Hunt
d372d2f62a Merge branch 'u/fanf2/zonemd' into 'master'
Correct ZONEMD expansion in ARM

See merge request isc-projects/bind9!1497
2019-02-08 16:16:29 -05:00
Tony Finch
af74f18536 Correct ZONEMD expansion in ARM 2019-02-08 17:11:30 +00:00
Michał Kępień
b8d37b6c89 Merge branch '869-prereq-sh-needed-in-forward-test' into 'master'
Resolve "prereq.sh needed in forward test"

Closes #869

See merge request isc-projects/bind9!1479
2019-02-08 09:05:02 -05:00
Curtis Blackburn
8c929bd7c5 added prereq.sh to forward test to detect perl Net::DNS 2019-02-08 14:07:00 +01:00
Michał Kępień
60c89a4c85 Merge branch '870-add-a-comment-explaining-a-mirror-zone-glitch' into 'master'
Add a comment explaining a mirror zone glitch

Closes #870

See merge request isc-projects/bind9!1480
2019-02-08 05:49:35 -05:00
Michał Kępień
2e4187afd5 Add a comment explaining a mirror zone glitch
Explain why in a certain edge case mirror zone data may not be used for
resolution purposes despite being available.
2019-02-08 05:49:22 -05:00
Mark Andrews
b46b243884 Merge branch '867-rrtypes-missing-from-named' into 'master'
Resolve "rrtypes missing from named"

Closes #867

See merge request isc-projects/bind9!1490
2019-02-07 22:08:14 -05:00
Mark Andrews
b06c5f8cfd add AMTRELAY and ZONEMD to ARM 2019-02-08 13:54:13 +11:00
Mark Andrews
a9fadafecd fix AMTRELAY name 2019-02-08 13:54:13 +11:00
Evan Hunt
b61c254d38 Merge branch 'each-dnssec-coverage-dots' into 'master'
dnssec-coverage was improperly ignoring some zones

See merge request isc-projects/bind9!1487
2019-02-07 20:10:45 -05:00
Evan Hunt
a242c704f5 CHANGES 2019-02-07 16:53:47 -08:00
Evan Hunt
9949163936 adjust style, match test to other tests 2019-02-07 16:53:46 -08:00
Tony Finch
a159675f44 dnssec-coverage: fix handling of zones without trailing dots
After change 5143, zones listed on the command line without trailing
dots were ignored.
2019-02-07 16:43:21 -08:00
Mark Andrews
cfdf457d3c Merge branch '867-rrtypes-missing-from-named' into 'master'
Resolve "rrtypes missing from named"

Closes #867

See merge request isc-projects/bind9!1484
2019-02-07 18:25:11 -05:00
Mark Andrews
8d69e15988 add top of range checks 2019-02-08 09:37:00 +11:00
Mark Andrews
1fb8d37ed9 Merge branch '867-rrtypes-missing-from-named' into 'master'
Resolve "rrtypes missing from named"

See merge request isc-projects/bind9!1475
2019-02-07 16:04:26 -05:00
Evan Hunt
72f6fb0697 CHANGES 2019-02-07 12:34:14 -08:00
Evan Hunt
3183663dd4 Add support for ZONEMD 2019-02-07 12:34:14 -08:00
Mark Andrews
66922ee7af Add support for ATMRELAY 2019-02-07 10:28:19 -08:00
Mark Andrews
5847318ab1 Merge branch '207-nslookup-takes-2-argvs-w-o-errors-uses-only-1st-and-last' into 'master'
Resolve "nslookup takes >2 argvs w/o errors, uses only 1st and last"

Closes #207

See merge request isc-projects/bind9!1382
2019-02-07 04:07:33 -05:00
Mark Andrews
f73816ff0f error out if there are extra command line options 2019-02-07 19:49:44 +11:00
Evan Hunt
acfbf1ae94 Merge branch 'each-configure-fix' into 'master'
configure could fail if cmocka was not detected

See merge request isc-projects/bind9!1474
2019-02-06 18:44:09 -05:00
Evan Hunt
15d41feb35 configure could fail if cmocka was not detected 2019-02-06 15:26:19 -08:00
Tinderbox User
afe73feae8 Merge branch 'prep-release' 2019-02-06 22:15:10 +00:00
Tinderbox User
b4d3f78293 prep 9.13.6 2019-02-06 22:13:05 +00:00
Evan Hunt
09a5c9aec4 Merge branch '774-improve-mirror-zone-documentation' into 'master'
Improve mirror zone documentation

Closes #774

See merge request isc-projects/bind9!1449
2019-02-06 14:03:38 -05:00
Michał Kępień
c33e1c98db Add CHANGES entry
5156.	[doc]		Extended and refined the section of the ARM describing
			mirror zones. [GL #774]
2019-02-06 11:00:27 -08:00
Michał Kępień
141a60f3a8 Extend and refine mirror zone documentation
Add a warning about potential performance implications of configuring a
non-root zone as a mirror zone.  Explain in more detail how each mirror
zone version is validated and how validation failures are handled.  Move
the paragraphs describing how to set up IANA root zone mirroring higher
up, so that they can be more easily found by the reader.  Explicitly
state that the "masters" option needs to be present for any mirror zone
which is not the root zone.  Tweak the description of the interaction
between the "dnssec-validation" setting and root zone mirroring to make
it less ambiguous.  Specify what the default "notify" setting is for
mirror zones.
2019-02-06 11:00:26 -08:00
Ondřej Surý
1a39a0c053 Merge branch 'ondrej/use-cmocka-if-available' into 'master'
Always use cmocka if available

See merge request isc-projects/bind9!1463
2019-02-06 06:39:02 -05:00
Ondřej Surý
72cb84f029 Fix typo 2019-02-06 12:08:34 +01:00
Ondřej Surý
ec7c41dd2a Simplify cmocka detection to use only pkg-config and always use cmocka if available 2019-02-06 12:04:33 +01:00
Matthijs Mekking
9bc600eff2 Merge branch 'michal/explain-hook-action-calling-order-in-more-detail' into 'master'
Explain hook action calling order in more detail

See merge request isc-projects/bind9!1451
2019-02-06 05:08:25 -05:00
Matthijs Mekking
2c34023a5e Explain hook action calling order in more detail 2019-02-06 10:09:38 +01:00
Mark Andrews
0738890313 Merge branch '857-inline-system-test-wasn-t-cleaning-k-files-on-restart-if-interrupted' into 'master'
Resolve "inline system test wasn't cleaning K* files on restart if interrupted."

Closes #857

See merge request isc-projects/bind9!1454
2019-02-06 00:58:35 -05:00
Ondřej Surý
519152b191 Simplify the inline clean script 2019-02-06 00:57:35 -05:00
Mark Andrews
1878efe661 clean K* files in inline system test directory 2019-02-06 00:57:35 -05:00
Mark Andrews
e8c38b8fff Merge branch '861-dsdigest-system-test-was-trying-to-read-a-non-existent-file-supported' into 'master'
Resolve "dsdigest system test was trying to read a non existent file 'supported'"

Closes #861

See merge request isc-projects/bind9!1467
2019-02-06 00:46:02 -05:00
Mark Andrews
275c355fba supported no longer exists so just do the default behaviour 2019-02-06 16:18:24 +11:00
Evan Hunt
c3219891a2 Merge branch 'u/fanf2/cleanup-cdnskey-to-ds' into 'master'
cleanup: allow building DS directly from CDNSKEY

See merge request isc-projects/bind9!1452
2019-02-05 22:57:44 -05:00
Tony Finch
2e173bbd24 cleanup: allow building DS directly from CDNSKEY
Relax an assertion in lib/dns/ds.c so that dnssec-cds does
not have to work around it. This will also be useful for
dnssec-dsfromkey.
2019-02-05 22:57:13 -05:00
Evan Hunt
18d94c806d Merge branch 'u/fanf2/cleanup-dnssec-revoke-help' into 'master'
cleanup: fix dnssec-revoke help text

See merge request isc-projects/bind9!1453
2019-02-05 22:52:06 -05:00
Tony Finch
f7b2bd304e cleanup: fix dnssec-revoke help text
Correct alignment and alphabetize
2019-02-05 22:51:30 -05:00
Evan Hunt
c22894a3d3 Merge branch 'u/fanf2/dsfromkey-man' into 'master'
cleanup: revamp the dnssec-dsfromkey man page and help output

See merge request isc-projects/bind9!1437
2019-02-05 22:48:20 -05:00
Tony Finch
6ca8e130ac cleanup: revamp the dnssec-dsfromkey man page and help output
* Alphabetize the option lists in the man page and help text

* Make the synopses more consistent between the man page and help
  text, in particular the number of different modes

* Group mutually exclusive options in the man page synopses, and order
  options so that it is more clear which are available in every mode

* Expand the DESCRIPTION to provide an overview of the output modes
  and input modes

* Improve cross-references between options

* Leave RFC citations to the SEE ALSO section, and clarify which RFC
  specifies what

* Clarify list of digest algorithms in dnssec-dsfromkey and dnssec-cds
  man pages
2019-02-05 19:02:18 -08:00
Mark Andrews
cd87d6152a Merge branch '859-named-paths' into 'master'
Resolve "print default file paths in named -V"

Closes #859

See merge request isc-projects/bind9!1458
2019-02-05 21:36:40 -05:00
Evan Hunt
25a3bb0409 CHANGES 2019-02-06 13:18:35 +11:00
Evan Hunt
2e7ec85497 construct the rndc.conf path from rndc.key 2019-02-06 13:18:00 +11:00
Evan Hunt
43ae6c623d print default file paths in 'named -V' output 2019-02-06 13:18:00 +11:00
Evan Hunt
2f13524164 initalize a named_g_defaultbindkeys variable 2019-02-06 13:18:00 +11:00
Mark Andrews
755efa9b18 Merge branch '860-process_opt-could-be-called-multiple-times-on-the-same-message-in-dig' into 'master'
Resolve "process_opt() could be called multiple times on the same message in dig."

Closes #860

See merge request isc-projects/bind9!1459
2019-02-05 20:59:31 -05:00
Mark Andrews
946d5c2c1e add CHANGES 2019-02-06 12:36:37 +11:00
Mark Andrews
0207199bb8 send over and undersized cookie 2019-02-06 12:34:42 +11:00
Mark Andrews
d9c368eee0 the condition test for checking the client cookie value was wrong; don't call process_opt multiple times 2019-02-06 12:34:42 +11:00
Ondřej Surý
a70c444529 Merge branch '822-test-make-install-in-one-of-the-build-jobs' into 'master'
Test "make install" in one of the build jobs

Closes #822

See merge request isc-projects/bind9!1450
2019-02-05 08:41:17 -05:00
Michał Kępień
2a231b6239 Test "make install" in one of the build jobs
Running "make install" in a separate job in the "test" phase of a CI
pipeline causes a lot of object files to be rebuilt due to the way
artifacts are passed between GitLab CI jobs (object files extracted from
the artifacts archive have older modification times than their
respective source files checked out using Git by the worker running the
"install" job).  Test "make install" in one of the build jobs instead,
in order to prevent object rebuilding.

Using 'after_script' for this purpose was not an option because its
failures are ignored.

Duplicating the build script in two places would be error-prone in the
long run and thus was rejected as a solution.  YAML anchors would also
not help in this case.

A "positive" test (`test -n "${RUN_MAKE_INSTALL}" && make install`)
would not work because:

  - it would cause the build script to fail for any job not supposed to
    run "make install",

  - appending `|| :` to the shell pipeline would prevent "make install"
    errors from causing a job failure.

Due to the above, a "negative" test is performed, so that:

  - jobs not supposed to run "make install" succeed immediately,

  - jobs supposed to run "make install" only succeed when "make install"
    succeeds.
2019-02-01 13:42:52 +01:00
Evan Hunt
1557d116ea Merge branch 'each-win-tests' into 'master'
tests failing on windows due to false crash-on-shutdown reports

See merge request isc-projects/bind9!1446
2019-02-01 01:55:25 -05:00
Evan Hunt
449842e1ce disable the check for crash on shutdown when running under cygwin 2019-01-31 21:35:08 -08:00
Evan Hunt
acf42a758a Merge branch '513-add-xfer-stats-for-primary-servers' into 'master'
Make primary's transfer log more detailed

See merge request isc-projects/bind9!1427
2019-01-31 17:16:13 -05:00
Michał Kępień
ed6317a1be Add CHANGES entry
5153.	[func]		Zone transfer statistics (size, number of records, and
			number of messages) are now logged for outgoing
			transfers as well as incoming ones. [GL #513]
2019-01-31 16:55:01 -05:00
Michał Kępień
a9a47c79e9 Add system tests for IXFR statistics
Ensure IXFR statistics are calculated correctly by dig and named, both
for incoming and outgoing transfers.  Disable EDNS when using dig to
request an IXFR so that the same reference file can be used for testing
statistics calculated by both dig and named (dig uses EDNS by default
when sending transfer requests, which affects the number of bytes
transferred).
2019-01-31 16:55:01 -05:00
Michał Kępień
a22e24a411 Add system tests for AXFR statistics
Ensure AXFR statistics are calculated correctly by dig and named, both
for incoming and outgoing transfers.  Rather than employing a zone which
is already used in the "xfer" system test, create a new one whose AXFR
form spans multiple TCP messages.  Disable EDNS when using dig to
request an AXFR so that the same reference file can be used for testing
statistics calculated by both dig and named (dig uses EDNS by default
when sending transfer requests, which affects the number of bytes
transferred).
2019-01-31 16:55:01 -05:00
Michał Kępień
6071c6cc27 Add functions for extracting transfer statistics
Add two helper shell functions to facilitate extracting transfer
statistics from dig output and named log files.
2019-01-31 16:55:01 -05:00
Michał Kępień
7f52b87227 Maintain and report outgoing transfer statistics
Transfer statistics are currently only reported for incoming transfers,
even though they are equally useful for outgoing transfers.  Define a
separate structure for keeping track of the number of messages, records,
and bytes sent during each outgoing transfer, along with the time each
outgoing transfer took.  Repurpose the 'nmsg' field of the xfrout_ctx_t
structure for tracking the number of messages actually sent, ensuring it
is only increased after isc_socket_send() indicates success.  Report the
statistics gathered when an outgoing transfer completes.
2019-01-31 16:55:01 -05:00
Michał Kępień
c20d81fd06 Track QUESTION section presence using a boolean
The 'nmsg' field of the xfrout_ctx_t structure is an integer, even
though it is only ever compared against 0 (for tracking whether the
QUESTION section has already been sent to the client).  Use a boolean
instead as it is more appropriate and also enables 'nmsg' to be
repurposed.
2019-01-31 16:55:01 -05:00
Evan Hunt
08ef7222aa Merge branch 'each-silence-warning' into 'master'
silence a spurious dnssec-keygen warning in the dnssec system test

See merge request isc-projects/bind9!1238
2019-01-31 16:42:38 -05:00
Evan Hunt
6661db9564 silence a spurious dnssec-keygen warning in the dnssec system test
the occluded-key test creates both a KEY and a DNSKEY. the second
call to dnssec-keygen calls dns_dnssec_findmatchingkeys(), which causes
a spurious warning to be printed when it sees the type KEY record.
this should be fixed in dnssec.c, but the meantime this change silences
the warning by reversing the order in which the keys are created.
2019-01-31 13:23:11 -08:00
Evan Hunt
39697f22fc Merge branch '714-dnssec-key-logging' into 'master'
Resolve "Add logging to DNSSEC key events"

Closes #714

See merge request isc-projects/bind9!1371
2019-01-31 15:32:10 -05:00
Evan Hunt
33f181ac93 CHANGES and release note 2019-01-31 12:18:55 -08:00
Evan Hunt
5c1c285370 test logging of key maintenance events 2019-01-31 12:18:55 -08:00
Evan Hunt
3c75d5d7c5 add more key maintenance event logging
log when a key is:
- published in the DNSKEY rrset
- activated
- deactivated
- unpublished from the DNSKEY rrset
- revoked
2019-01-31 12:18:55 -08:00
Evan Hunt
7fa6b88d9b include the name when logging that a key is being fetched from key repostitory 2019-01-31 12:18:19 -08:00
Evan Hunt
e3fe19df55 increase the log level for some key status and managed-key events
some key-related events were logged at DEBUG(3) but seem likely to
be relevant to a typical operator's interests during key rollovers.
2019-01-31 12:18:19 -08:00
Evan Hunt
a7cadde982 use log category "dnssec" instead of "zone" for DNSSEC-related events
use "dnssec" log category for:
- managed key zone events
- DNSSEC key status changes (activation, deletion, etc)
- zone signing status
2019-01-31 12:18:12 -08:00
Evan Hunt
308ab1b4a5 style cleanups 2019-01-31 11:57:16 -08:00
Evan Hunt
41d79f054d Merge branch '850-catch-shutdown-aborts' into 'master'
detect crash on shutdown in stop.pl

Closes #850

See merge request isc-projects/bind9!1435
2019-01-31 12:27:54 -05:00
Evan Hunt
9bf37f4e48 detect crash on shutdown in stop.pl 2019-01-31 12:16:53 -05:00
Evan Hunt
7b86c01d53 Merge branch '849-fix-tkey-leak' into 'master'
fix TKEY problems

Closes #849

See merge request isc-projects/bind9!1434
2019-01-31 12:15:34 -05:00
Evan Hunt
73ba24fb36 Change #4148 wasn't complete
- there was a memory leak when using negotiated TSIG keys.
- TKEY responses could only be signed when using a newly negotiated
  key; if an existent matching TSIG was found in in the keyring it
  would not be used.
2019-01-31 09:01:23 -08:00
Ondřej Surý
8793a4f350 Merge branch '358-ancient-options' into 'master'
make ancient named.conf options fatal

Closes #358

See merge request isc-projects/bind9!1373
2019-01-31 06:16:26 -05:00
Evan Hunt
b986164a0d Add CHANGES entry for #358. 2019-01-31 11:54:50 +01:00
Evan Hunt
ff3dace139 Ancient named.conf options are now a fatal configuration error
- options that were flagged as obsolete or not implemented in 9.0.0
  are now flagged as "ancient", and are a fatal error
- the ARM has been updated to remove these, along with other
  obsolete descriptions of BIND 8 behavior
- the log message for obsolete options explicitly recommends removal
2019-01-31 11:54:26 +01:00
Ondřej Surý
5a623052a1 Merge branch '735-remove-ability-to-disable-dbc-assertions' into 'master'
Remove support for compiling without assertions (Both ISC_CHECK_ALL, ISC_CHECK_NONE are now gone)

Closes #735

See merge request isc-projects/bind9!1130
2019-01-31 05:37:19 -05:00
Ondřej Surý
5840d24033 Add CHANGES entry for GL #735. 2019-01-31 11:16:27 +01:00
Ondřej Surý
3a3e75042d Remove support for compiling without assertions (Both ISC_CHECK_ALL, ISC_CHECK_NONE are now gone) 2019-01-31 11:16:08 +01:00
Matthijs Mekking
dfb2a72e1a Merge branch '101-dumpdb-stale-ttl' into 'master'
Resolve "[Support#12071] [RT#46548] Output stale/expired data with 'rndc dumpdb'"

Closes #101

See merge request isc-projects/bind9!1387
2019-01-31 04:25:20 -05:00
Matthijs Mekking
d17b79fe6a CHANGES 2019-01-31 09:35:50 +01:00
Matthijs Mekking
a2d115cbfc Add tests for dumpdb stale ttl
This adds a test for rndc dumpdb to ensure the correct "stale
comment" is printed.  It also adds a test for non-stale data to
ensure no "stale comment" is printed for active RRsets.

In addition, the serve-stale tests are hardened with more accurate
grep calls.
2019-01-31 09:35:49 +01:00
Matthijs Mekking
924ebc605d Print in dump-file stale ttl
This change makes rndc dumpdb correctly print the "; stale" line.
It also provides extra information on how long this data may still
be served to clients (in other words how long the stale RRset may
still be used).
2019-01-30 14:11:12 -08:00
Evan Hunt
9a58b25f7f Merge branch '821-matthijs-unsigned-gss-tsig-tkey-query-response' into 'master'
Resolve "Unsigned GSS-TSIG TKEY Query Response"

Closes #821

See merge request isc-projects/bind9!1429
2019-01-30 14:59:35 -05:00
Matthijs Mekking
f1c6e01a0f Update CHANGES 2019-01-30 11:47:02 -08:00
Matthijs Mekking
b05a095a3e Harden checks 2019-01-30 11:46:43 -08:00
Matthijs Mekking
1cc25ff5e0 Better signed TKEY response verification 2019-01-30 11:46:11 -08:00
Matthijs Mekking
935af4a795 No longer need +question 2019-01-30 11:46:11 -08:00
Evan Hunt
0010f73cde suggested alternate test for TSIG signature
feel free to remove this commit if you prefer the other method.
2019-01-30 11:46:11 -08:00
Evan Hunt
4754fa2ded "grep -q" isn't portable 2019-01-30 11:46:11 -08:00
Evan Hunt
13c799267b remove the 'new_tsigkey' exception, allow TSIG to be set any time
this allows 'dns_message_settsigkey()' to be run any time after
parsing without having to set a special flag in the message object.
2019-01-30 11:46:11 -08:00
Evan Hunt
33ec311332 allow TSIG key to be added to message structure after parsing
up until now, message->tsigkey could only be set during parsing
of the request, but gss-tsig allows one to be created afterward.

this commit adds a new flag to the message structure, `new_tsigkey`,
which indicates that in this case it's okay for `dns_message_settsigkey()`
to be run on a message after parsing, without hitting any assertions due
to the lack of a TSIG in the request. this allows us to keep the current
restriction in place generally, but add an exception for TKEY processing.
it's probably better to just remove the restriction entirely (see next
commit).
2019-01-30 11:46:11 -08:00
Matthijs Mekking
29323a39bf Weak verification for signed TKEY response
The introduced grep call checks whether there was a
response that has an answer and an additional record.
There should be only one in the nsupdate output that is
for the TKEY response.
2019-01-30 11:46:11 -08:00
Matthijs Mekking
1302dea184 Some thoughts on a solution 2019-01-30 11:45:30 -08:00
Matthijs Mekking
9fcad11e34 Weak verification for signed TKEY response
The introduced grep call checks whether there was a
response that has an answer and an additional record.
There should be only one in the nsupdate output that is
for the TKEY response.
2019-01-30 11:45:30 -08:00
Matthijs Mekking
cbe51ba325 Harden GSS-TSIG tests 2019-01-30 11:45:30 -08:00
Ondřej Surý
92099923c6 Merge branch 'each-fix-win32-build' into 'master'
atomic_store wasn't working on windows

See merge request isc-projects/bind9!1403
2019-01-30 10:56:47 -05:00
Ondřej Surý
27eb6189a8 Fix Centos 6 build by explicitly casting to __typeof__(obj) in atomic_compare_exchange_strong shim function 2019-01-30 15:54:17 +01:00
Witold Kręcicki
9ded5d5193 Cast atomic_load_explicit to proper size 2019-01-30 14:12:06 +01:00
Ondřej Surý
f2d1a88efc Add #pragma intrinsic for intrinsic Windows functions 2019-01-30 13:48:58 +01:00
Ondřej Surý
9539e1c3a1 Fix memory_order_cst_seq -> memory_order_seq_cst typo 2019-01-30 13:48:58 +01:00
Ondřej Surý
d3e0604354 Properly use atomic_compare_exchange instead of load/store 2019-01-30 13:48:58 +01:00
Ondřej Surý
4f5e83b139 Add define for InterlockedExchangeAdd8 intrinsic 2019-01-30 13:48:58 +01:00
Ondřej Surý
7a7a8b0f7b Add atomic_bool implementation to unix and win32 stdatomic.h shim headers 2019-01-30 09:37:38 +01:00
Ondřej Surý
a84e70acd0 Fix copy&paste error in the atomic_fetch_add_explicit{32,64} macros.
- InterlockedExchange was incorrectly used in place where InterlockedExchangeAdd
  should have been used
2019-01-30 09:37:38 +01:00
Ondřej Surý
f8c96ad27a Bump Windows minimum target environment to _WIN32_WINNT_WIN8/NTDDI_WIN8 values 2019-01-30 09:37:38 +01:00
Evan Hunt
19dd6a409c Fix a typo in the win32 version of the atomic_store macro 2019-01-30 09:37:38 +01:00
Evan Hunt
39527e9c36 Moved the unix version to lib/isc/unix/include/isc so it's more obvious in the future that it isn't the only copy 2019-01-30 09:37:38 +01:00
Mark Andrews
3f16a6afc1 Merge branch '848-keymgr-19-old-keys-failing-on-penguin' into 'master'
Resolve "keymgr 19-old-keys failing on penguin"

Closes #848

See merge request isc-projects/bind9!1424
2019-01-29 23:36:31 -05:00
Mark Andrews
b9d5a62bdc add CHANGES 2019-01-29 20:18:01 -08:00
Mark Andrews
acf0292da4 add 300 seconds of fudge 2019-01-29 20:14:45 -08:00
Mark Andrews
36ea9b8181 only use a single policy file when testing. 2019-01-30 15:00:14 +11:00
Evan Hunt
4e86a57ba2 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1421
2019-01-29 18:07:31 -05:00
Evan Hunt
088008328c placeholder 2019-01-29 15:07:01 -08:00
Evan Hunt
8d1cdc60da Merge branch '766-querytrace-doc' into 'master'
Resolve "--enable-querytrace has negative performance impact - update the documentation to say this"

Closes #766

See merge request isc-projects/bind9!1367
2019-01-29 17:19:49 -05:00
Evan Hunt
51048ca06e added querytrace documentation in README
also:
- rearranged things a little, adding a "dependencies" section
- removed the documentation of 'enable-threads'. (this part of
  the change should not be backported.)
2019-01-29 14:18:13 -08:00
Michał Kępień
f0a3525ba3 Merge branch 'michal/add-fedora-29-to-ci' into 'master'
Add Fedora 29 to CI

See merge request isc-projects/bind9!1414
2019-01-29 07:53:15 -05:00
Michał Kępień
38b6c5c444 Add Fedora 29 to CI
Modify .gitlab-ci.yml so that every CI pipeline also builds and tests
BIND on Fedora 29.
2019-01-29 07:25:00 -05:00
Ondřej Surý
8551497df3 Merge branch 'ondrej/configure.ac-fix-int-assignment-to-pointer-in-ECC-checks' into 'master'
Change the check for EC curves so it doesn't assign int to pointer

See merge request isc-projects/bind9!1413
2019-01-29 07:20:41 -05:00
Ondřej Surý
5338e5fc32 Change the check for EC curves so it doesn't assign int to pointer 2019-01-29 12:43:55 +01:00
Witold Krecicki
ffa3be2b04 Merge branch 'wpk-fix-taskmgr-tsan-issues' into 'master'
ix taskmgr tsan issues

See merge request isc-projects/bind9!1396
2019-01-29 03:56:55 -05:00
Witold Kręcicki
a003908af4 Fix a race in access to manager->tasks in taskmgr
Make taskmgr->mode and boolean state flags (exclusive, paused, exiting) atomic.
2019-01-29 03:32:29 -05:00
Mark Andrews
d0222edbdd Merge branch '845-configure-PLATFORMS' into 'master'
corrected PLATFORM.md to PLATFORMS.md to match reality

Closes #845

See merge request isc-projects/bind9!1408
2019-01-28 23:59:57 -05:00
Alan
f60784c625 corrected PLATFORM.md to PLATFORMS.md to match reality 2019-01-28 23:41:49 -05:00
Evan Hunt
1cccf601d7 Merge branch '259-named-args' into 'master'
add properly-formatted -D options to named.args files

Closes #259

See merge request isc-projects/bind9!1372
2019-01-28 23:24:42 -05:00
Evan Hunt
dd45831acc also add -D options for transient named processes started in tests.sh 2019-01-28 19:58:24 -08:00
Evan Hunt
175d6e9bfb add properly-formatted -D options to named.args files
this prevents servers that use arguments specified in named.args
from appearing different in 'ps' output from servers run with arguments
from start.pl
2019-01-28 19:58:24 -08:00
Evan Hunt
377a7e7bba Merge branch 'each-fix-logfileconfig' into 'master'
reset SYSTEMTESTTOP when changing directories

See merge request isc-projects/bind9!1407
2019-01-28 22:57:47 -05:00
Evan Hunt
70f36a25e4 reset SYSTEMTESTTOP when changing directories 2019-01-28 19:57:19 -08:00
Mark Andrews
8672f5cb5a Merge branch '842-broken-build' into 'master'
rename struct members to avoid a name collision on BSD and MacOS

Closes #842

See merge request isc-projects/bind9!1406
2019-01-28 21:32:56 -05:00
Evan Hunt
995134ce76 rename struct members to avoid a name collision on BSD 2019-01-28 10:59:48 -08:00
Evan Hunt
64745bbc21 Merge branch 'michal/update-PLATFORMS-2019-01' into 'master'
Update PLATFORMS (January 2019)

See merge request isc-projects/bind9!1405
2019-01-28 13:54:15 -05:00
Michał Kępień
fd89fa015b Update the list of supported platforms
- Change 5023 (present in BIND 9.13.3+) removed BIND's internal
  implementation of the getifaddrs() function which was required for
  iterating network interfaces on Solaris 10 as that system does not
  support that function natively.
- As of January 2019, FreeBSD 10.x is neither supported upstream nor
  regularly tested by ISC, so move it from the list of regularly tested
  platforms to the "Best effort" section.
- Debian 10, OpenBSD 6.3, and Fedora 29 have been released and are now
  tested regularly.
2019-01-28 10:49:03 -08:00
Witold Krecicki
14d48a9b69 Merge branch 'wpk-atomic-counters-quota' into 'master'
Atomic counters and quota

See merge request isc-projects/bind9!1389
2019-01-25 04:45:27 -05:00
Witold Kręcicki
d314e45cc3 CHANGES entry 2019-01-25 04:26:49 -05:00
Witold Kręcicki
42d9a536a7 Make isc_counter use atomics instead of locks 2019-01-25 04:26:49 -05:00
Witold Kręcicki
0af500a2c5 - Make isc_quota use atomics instead of locks
- Use getters for isc_quota parameters, make fields private
- Fix a potential data race with recursion clients limits logging
2019-01-25 04:26:49 -05:00
Witold Kręcicki
814bfa23b2 Add atomic_store_relaxed and atomic_load_relaxed macros to isc/atomic.h, fix issues in isc/stdatomic.h 2019-01-25 04:26:49 -05:00
Evan Hunt
9a2d889c69 Merge branch 'each-win32-test-list' into 'master'
fix win32 system tests

See merge request isc-projects/bind9!1381
2019-01-25 03:45:06 -05:00
Evan Hunt
7cc9fdc7fb fix rrl test
strip CR characters before using awk/sed
2019-01-25 00:44:11 -08:00
Evan Hunt
8cd39fae80 fix rpz test
- work around a CR newline problem
- use rndc to stop servers
2019-01-25 00:44:11 -08:00
Evan Hunt
f7471494ed fix rpzrecurse test
use rndc to stop servers
2019-01-25 00:44:11 -08:00
Evan Hunt
8778f484b3 fix dnssec test
- work around CR issues
- use UTC for time comparisons
- use $DIFF instead of cmp
2019-01-25 00:44:11 -08:00
Evan Hunt
8acc3434a7 fix legacy test
use rndc rather than signals to stop the server
2019-01-25 00:44:11 -08:00
Evan Hunt
fef19fb978 fix fetchlimit test
use TCP for the test queries in between UDP bursts; this avoids
congestion issues that interfered with the test on windows
2019-01-25 00:44:11 -08:00
Evan Hunt
5656e97ddf fix nsupdate test
rndc_reload was failing on windows
2019-01-25 00:44:11 -08:00
Evan Hunt
7942bc93e2 fix sfcache test
use a lame server configuration to force SERVFAILs instead of killing ns2.
this prevents test failures that occurred due to a different behavior of
the netowrking stack in windows.
2019-01-25 00:44:11 -08:00
Evan Hunt
a77b6a8abc fix rndc test
use regex instead of exact string matching to deal with CR at end of line
2019-01-25 00:44:11 -08:00
Evan Hunt
1150a008b2 fix statistics test
the active sockets test is supposed to be commented out on win32, but
only part of it was
2019-01-25 00:44:11 -08:00
Evan Hunt
37b0af81d2 fix redirect test
strip CR characters before using sed
2019-01-25 00:44:11 -08:00
Evan Hunt
6881f919e7 fix notify test
test the average delay between notifies instead of the minimum delay;
this helps avoid unnecessary test failures on systems with bursty
network performance.
2019-01-25 00:44:11 -08:00
Evan Hunt
10aba2cbbb fix masterformat test
use stop.pl instead of rndc to stop server
2019-01-25 00:44:11 -08:00
Evan Hunt
2ae3c97599 fix inline test
use regex instead of exact string matching, to deal with CR at end of ine
2019-01-25 00:44:11 -08:00
Evan Hunt
8b0d5a98bb fix forward test
strip CR characters before using sed
2019-01-25 00:44:11 -08:00
Evan Hunt
673cd0beeb fix cookie test
strip CR characters before comparing files
2019-01-25 00:44:11 -08:00
Evan Hunt
097cbec3c4 fix cds test
- use $PERL instead of perl
- use $DIFF instead of cmp for windows portability; cmp doesn't
  handle CR characters properly
2019-01-25 00:44:11 -08:00
Evan Hunt
e6f2c2f51f fix addzone test
typographical error prevented reconfiguration
2019-01-25 00:44:11 -08:00
Evan Hunt
def7574b1e use $DIFF instead of diff 2019-01-25 00:44:11 -08:00
Evan Hunt
d3d106b82c remove logfileconfig from test list
this test doesn't work on windows
2019-01-25 00:44:11 -08:00
Evan Hunt
c02dad7991 set and use SYSTEMTESTTOP consistently 2019-01-25 00:44:11 -08:00
Evan Hunt
1bc0ab5217 complete the set of tools available in windows tests
- dnssec-cds wasn't being built for windows
- nsec3hash was available, but the NSEC3HASH variable wasn't
  set in conf.sh.win32
2019-01-25 00:44:11 -08:00
Evan Hunt
086f770b38 more reliable method for killing "ans" servers on windows
as perl and python are both native to cygwin, we don't want to use
the "kill -f" option to terminate them.
2019-01-25 00:44:11 -08:00
Evan Hunt
3012803a22 update ifconfig.bat with current test interfaces
the addresses set up in ifconfig.bat were out of sync with the
ones in ifconfig.sh
2019-01-25 00:44:11 -08:00
Evan Hunt
d1fc4601ce update conf.sh.win32 test list
- the test lists in conf.sh.in and conf.sh.win32 were out of sync
2019-01-25 00:44:11 -08:00
Evan Hunt
99060c0d7f Merge branch '820-dig-return-a-non-zero-exit-code-for-failed-tcp-eof-retries' into 'master'
dig: return a non-zero exit code for failed TCP EOF retries

Closes #820

See merge request isc-projects/bind9!1358
2019-01-25 02:53:48 -05:00
Michał Kępień
7a1c0dc558 Add CHANGES entry
5144.	[bug]		dig now returns a non-zero exit code when a TCP
			connection is prematurely closed by a peer more than
			once for the same lookup.  [GL #820]
2019-01-24 23:06:07 -08:00
Michał Kępień
0f168a4b37 dig: return a non-zero exit code for failed TCP EOF retries
dig retries a TCP query when a server closes the connection prematurely.
However, dig's exit code remains unaffected even if the second attempt
to get a response also fails with the same error for the same lookup,
which should not be the case.  Ensure the exit code is updated
appropriately when a retry triggered by a TCP EOF condition fails.
2019-01-24 23:05:43 -08:00
Evan Hunt
91d1218097 Merge branch '560-dnssec-keymgr-root' into 'master'
improve handling of trailing dots in dnssec-keymgr and dnssec-coverage

Closes #560

See merge request isc-projects/bind9!1374
2019-01-24 15:51:04 -05:00
Evan Hunt
1ccf4e6c16 improve handling of trailing dots in dnssec-keymgr and dnssec-coverage
- mishandling of trailing dots caused bad behavior with the
  root zone or names like "example.com."
- fixing this exposed an error in dnssec-coverage caused the
  wrong return value if there were KSK errors but no ZSK errors
- incidentally silenced the dnssec-keygen output in the coverage
  system test
2019-01-24 12:33:42 -08:00
Evan Hunt
58e4d00c43 Merge branch '323-cleanup-cfg' into 'master'
cleanup cfg_parse_buffer* functions

Closes #323

See merge request isc-projects/bind9!1377
2019-01-24 15:26:17 -05:00
Evan Hunt
cf072d659e cleanup cfg_parse_buffer* functions
cfg_parse_buffer() now has the same signature as the former
cfg_parse_buffer4(). cfg_parse_buffer{2,3,4}() have been removed.
2019-01-24 12:08:54 -08:00
Evan Hunt
57dedab3f3 Merge branch 'each-dead-code-cleanup' into 'master'
remove dead RPZ code

See merge request isc-projects/bind9!1392
2019-01-24 15:03:00 -05:00
Matthijs Mekking
7c13f1779e Remove dead code 2019-01-24 12:00:09 -08:00
Evan Hunt
710a3aaf14 Merge branch '824-configure-nsip' into 'master'
remove --disable-rpz-nsip and --disable-rpz-nsdname from configure

Closes #824

See merge request isc-projects/bind9!1376
2019-01-24 14:57:03 -05:00
Evan Hunt
b9c9f2593a remove --disable-rpz-nsip and --disable-rpz-nsdname from configure 2019-01-24 11:32:44 -08:00
Evan Hunt
7311ebe9d3 Merge branch 'each-set-magic-last' into 'master'
set the magic number at the end of dns_dt_create()

See merge request isc-projects/bind9!1383
2019-01-23 14:12:21 -05:00
Evan Hunt
c29abd307c set the magic number at the end of dns_dt_create() 2019-01-23 14:12:09 -05:00
Evan Hunt
e6bf898edf Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1385
2019-01-23 14:05:32 -05:00
Evan Hunt
1b1cd4de2f placeholder 2019-01-23 11:05:03 -08:00
Evan Hunt
fa53cc0451 Merge branch '117-running-dnssec-keymgr-with-old-keys-inactivates-deletes-them-immediately' into 'master'
Resolve "Running dnssec-keymgr with old keys inactivates/deletes them immediately"

Closes #117

See merge request isc-projects/bind9!1378
2019-01-22 13:10:47 -05:00
Mark Andrews
083b730ec7 introducing keymgr need to preserve functionality 2019-01-22 09:52:47 -08:00
Evan Hunt
914e8ddd61 Merge branch '823-masterformat-test-fix' into 'master'
fix broken masterformat test

Closes #823

See merge request isc-projects/bind9!1365
2019-01-21 02:04:08 -05:00
Evan Hunt
bc7b34d6ef fix broken masterformat test
- dig command had the @ parameter in the wrong place
- private-dnskey and private-cdnskey are queried in a separate
  loop, which strips 'private-' from the name to determine the qtype
2019-01-21 01:41:25 -05:00
Mark Andrews
f13c87b89a Merge branch 'each-remove-fprintf' into 'master'
clean up debugging fprintf

See merge request isc-projects/bind9!1368
2019-01-20 20:56:53 -05:00
Evan Hunt
6c478a3dae removed a debugging fprintf 2019-01-20 17:38:32 -08:00
Michał Kępień
8c30864374 Merge branch 'michal/gitlab-ci-cleanup' into 'master'
GitLab CI cleanup

See merge request isc-projects/bind9!1329
2019-01-18 08:49:40 -05:00
Michał Kępień
a27b9dff18 Add comments 2019-01-18 14:28:47 +01:00
Michał Kępień
a61bf39688 Unify YAML style used throughout .gitlab-ci.yml 2019-01-18 14:28:47 +01:00
Michał Kępień
1c8c1815e4 Tweak pipeline triggering settings
In an attempt to ensure that:

  - all important changes to repository contents are tested,
  - pipelines are not automatically created for every single push,
  - some flexibility is allowed for corner cases,

change pipeline triggering settings so that:

  - full build & test pipelines are only automatically created for merge
    requests and tags (both for creation and updates),

  - pipelines for other repository changes (e.g. pushes to arbitrary
    branches) can only be created manually, using GitLab's web
    interface,

  - merging a merge request only causes jobs pushing the updated ARM to
    GitLab Pages to be run (as semi-linear Git history is enforced and
    thus testing a MR is identical to testing the target branch
    post-merge in terms of code),

  - repository synchronization does not trigger duplicate pipelines in
    projects which are set as mirroring targets.
2019-01-18 14:28:47 +01:00
Michał Kępień
a1dbec3b08 Reorder job definitions
Group jobs by build type and operating system to make the layout of
.gitlab-ci.yml more consistent and improve locality of YAML references.
2019-01-18 14:28:47 +01:00
Michał Kępień
1fe432c6c3 Use a common naming pattern for all jobs
Make sure all jobs are named using the following pattern:

    [<job-type>:]<build-type>:<system>:<architecture>

where specifying <job-type> is optional for "precheck" and "build" jobs.

This should make it easier to quickly recognize:

  - what kind of actions are performed by each job,
  - which BIND build flavor is used by each job,
  - which operating system image is used by each job.
2019-01-18 14:28:47 +01:00
Michał Kępień
e0b5dd67a1 Define a template for precheck jobs 2019-01-18 14:28:47 +01:00
Michał Kępień
de1948398d Merge install_test_job template into the job definition as it is only used once 2019-01-18 14:28:47 +01:00
Michał Kępień
7dd329d385 Shorten Docker image definitions by using YAML anchors for runner tags
While we are at it, drop use of the "docker" tag since all BIND CI jobs
are currently run inside Docker containers.
2019-01-18 14:28:47 +01:00
Michał Kępień
41a67147fe Build ARM in the build stage
There is no need to build BIND binaries before building docs and thus
the job building the current version of the ARM can be moved to the
build stage of CI.
2019-01-18 14:28:47 +01:00
Michał Kępień
75b26d3f50 Replace double colon with a single colon 2019-01-18 14:28:47 +01:00
Michał Kępień
9893bd3246 Remove unused parts of .gitlab-ci.yml
Remove the following from .gitlab-ci.yml:

  - unused variable definitions,
  - unused Docker image definitions,
  - commands which have no effect,
  - sections which were commented out.
2019-01-18 14:28:47 +01:00
Evan Hunt
4a82749461 Merge branch '752-disable-forwarders-when-priming' into 'master'
If possible don't use forwarders when priming the resolver.

Closes #752

See merge request isc-projects/bind9!1296
2019-01-16 17:52:08 -05:00
Witold Kręcicki
b49310ac06 If possible don't use forwarders when priming the resolver.
If we try to fetch a record from cache and need to look into
hints database we assume that the resolver is not primed and
start dns_resolver_prime(). Priming query is supposed to return
NSes for "." in ANSWER section and glue records for them in
ADDITIONAL section, so that we can fill that info in 'regular'
cache and not use hints db anymore.
However, if we're using a forwarder the priming query goes through
it, and if it's configured to return minimal answers we won't get
the addresses of root servers in ADDITIONAL section. Since the
only records for root servers we have are in hints database we'll
try to prime the resolver with every single query.

This patch adds a DNS_FETCHOPT_NOFORWARD flag which avoids using
forwarders if possible (that is if we have forward-first policy).
Using this flag on priming fetch fixes the problem as we get the
proper glue. With forward-only policy the problem is non-existent,
as we'll never ask for root server addresses because we'll never
have a need to query them.

Also added a test to confirm priming queries are not forwarded.
2019-01-16 17:41:13 -05:00
Mark Andrews
a97a63ad51 Merge branch 'pkcs11-pubattr-check' into 'master'
Make sure null atributes are never used

See merge request isc-projects/bind9!1353
2019-01-16 16:37:55 -05:00
Petr Menšík
fe9ef0d9f5 Make sure null atributes are never used
Add INSIST to pubattr fetching where null might occur in therory. Make
sure null is never dereferenced.
2019-01-16 15:48:37 -05:00
Evan Hunt
3d5826b75b Merge branch '797-handle-timeouts-when-qminimizing' into 'master'
Don't retry query on timeout if we're qname minimizing

Closes #797

See merge request isc-projects/bind9!1293
2019-01-16 14:21:08 -05:00
Witold Kręcicki
cfa2804e5a When a forwarder fails and we're not in a forward-only mode we
go back to regular resolution. When this happens the fetch timer is
already running, and we might end up in a situation where we we create
a fetch for qname-minimized query and after that the timer is triggered
and the query is retried (fctx_try) - which causes relaunching of
qname-minimization fetch - and since we already have a qmin fetch
for this fctx - assertion failure.

This fix stops the timer when doing qname minimization - qmin fetch
internal timer should take care of all the possible timeouts.
2019-01-16 11:09:30 -08:00
Evan Hunt
bbb0947ee1 Merge branch '818-improve-mirror-zone-logging' into 'master'
Improve mirror zone logging

Closes #818

See merge request isc-projects/bind9!1351
2019-01-16 14:05:20 -05:00
Michał Kępień
5d37c910c8 Add CHANGES entry
5137.	[func]		named now logs messages whenever a mirror zone becomes
			usable or unusable for resolution purposes. [GL #818]
2019-01-16 10:38:17 -08:00
Michał Kępień
7d6b8f7c12 Log a message when a mirror zone becomes unusable
Log a message if a mirror zone becomes unusable for the resolver (most
usually due to the zone's expiration timer firing).  Ensure that
verification failures do not cause a mirror zone to be unloaded
(instead, its last successfully verified version should be served if it
is available).
2019-01-16 10:38:12 -08:00
Michał Kępień
7665e13206 Log a message when a mirror zone loaded from disk comes into effect
Log a message when a mirror zone is successfully loaded from disk and
subsequently verified.

This could have been implemented in a simpler manner, e.g. by modifying
an earlier code branch inside zone_postload() which checks whether the
zone already has a database attached and calls attachdb() if it does
not, but that would cause the resulting logs to indicate that a mirror
zone comes into effect before the "loaded serial ..." message is logged,
which would be confusing.

Tweak some existing sed commands used in the "mirror" system test to
ensure that separate test cases comprising it do not break each other.
2019-01-16 10:34:15 -08:00
Michał Kępień
1c97ace7dc Log a message when a transferred mirror zone comes into effect
Log a message when a mirror zone is successfully transferred and
verified, but only if no database for that zone was yet loaded at the
time the transfer was initiated.

This could have been implemented in a simpler manner, e.g. by modifying
zone_replacedb(), but (due to the calling order of the functions
involved in finalizing a zone transfer) that would cause the resulting
logs to suggest that a mirror zone comes into effect before its transfer
is finished, which would be confusing given the nature of mirror zones
and the fact that no message is logged upon successful mirror zone
verification.

Once the dns_zone_replacedb() call in axfr_finalize() is made, it
becomes impossible to determine whether the transferred zone had a
database attached before the transfer was started.  Thus, that check is
instead performed when the transfer context is first created and the
result of this check is passed around in a field of the transfer context
structure.  If it turns out to be desired, the relevant log message is
then emitted just before the transfer context is freed.

Taking this approach means that the log message added by this commit is
not timed precisely, i.e. mirror zone data may be used before this
message is logged.  However, that can only be fixed by logging the
message inside zone_replacedb(), which causes arguably more dire issues
discussed above.

dns_zone_isloaded() is not used to double-check that transferred zone
data was correctly loaded since the 'shutdown_result' field of the zone
transfer context will not be set to ISC_R_SUCCESS unless axfr_finalize()
succeeds (and that in turn will not happen unless dns_zone_replacedb()
succeeds).
2019-01-16 10:33:02 -08:00
Evan Hunt
c13879a6fb Merge branch '512-acl-config' into 'master'
Resolve "inconsistent comments, documentation and behavior with some ACLs"

Closes #512

See merge request isc-projects/bind9!733
2019-01-16 02:40:58 -05:00
Evan Hunt
03ab07c9c0 CHANGES 2019-01-15 23:20:38 -08:00
Evan Hunt
33bca30a55 improved documentation 2019-01-15 23:20:38 -08:00
Evan Hunt
27f3a210d7 fix incorrect comments 2019-01-15 23:20:38 -08:00
Evan Hunt
adcc16f2d7 error on allow-update and allow-update-forwarding at options/view level 2019-01-15 23:20:38 -08:00
Evan Hunt
42de310291 Merge branch '816-sparc-assembler-not-recognising-pause-instruction-on-base-v9-arch' into 'master'
Resolve "Sparc assembler not recognising "pause" instruction on base v9 arch"

Closes #816

See merge request isc-projects/bind9!1338
2019-01-15 20:41:43 -05:00
Mark Andrews
2be55f5c05 use smt_pause instead of pause on sparc 2019-01-15 20:29:27 -05:00
Evan Hunt
02497cf6d3 Merge branch '792-bind9-doesn-t-tcp-retransmit' into 'master'
Resolve "bind9 doesn't tcp retransmit"

Closes #792

See merge request isc-projects/bind9!1284
2019-01-15 20:21:18 -05:00
Mark Andrews
dadb924be7 adjust timeout to allow for ECN negotiation failures 2019-01-15 17:10:41 -08:00
Mark Andrews
f056d04eed Merge branch '590-win32-sample-gai-c-should-call-wsastartup' into 'master'
Resolve "[Win32] sample-gai.c should call WSAStartup()"

Closes #590

See merge request isc-projects/bind9!1340
2019-01-15 00:26:32 -05:00
Mark Andrews
4500d9e91a add CHANGES 2019-01-15 14:23:21 +11:00
Mark Andrews
ac01359871 ensure that WSAStartup is called before getservbyname 2019-01-15 14:19:59 +11:00
Evan Hunt
47346110b1 Merge branch 'u/fanf2/rndc-managed-keys' into 'master'
Fix a few cosmetic issues with `rndc managed-keys`

See merge request isc-projects/bind9!1327
2019-01-14 19:11:28 -05:00
Mark Andrews
7122b5786d add multi-view server and tests 2019-01-14 14:10:05 -08:00
Mark Andrews
3175ea9a87 add CHANGES note 2019-01-14 14:01:42 -08:00
Tony Finch
6a3b851f72 Fix a few cosmetic issues with rndc managed-keys
The handling of class and view arguments was broken, because the code
didn't realise that next_token() would overwrite the class name when
it parsed the view name. The code was trying to implement a syntax
like `refresh [[class] view]`, but it was documented to have a syntax
like `refresh [class [view]]`. The latter is consistent with other rndc
commands, so that is how I have fixed it.

Before:

$ rndc managed-keys refresh in rec
rndc: 'managed-keys' failed: unknown class/type
unknown class 'rec'

After:

$ rndc managed-keys refresh in rec
refreshing managed keys for 'rec'

There were missing newlines in the output from `rndc managed-keys
refresh` and `rndc managed-keys destroy`.

Before:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'refreshing managed keys for 'auth'

After:

$ rndc managed-keys refresh
refreshing managed keys for 'rec'
refreshing managed keys for 'auth'
2019-01-14 14:01:24 -08:00
Evan Hunt
2d68f606cf Merge branch 'ondrej/each-fix-dnssec-test-error-bis' into 'master'
b/t/s/dnssec/tests.sh: Cleanup showprivate() function

See merge request isc-projects/bind9!1335
2019-01-14 15:17:56 -05:00
Ondřej Surý
fd050b6baf b/t/s/dnssec/tests.sh: Cleanup showprivate() function 2019-01-14 11:49:55 +01:00
Ondřej Surý
246ac08770 Merge branch 'ondrej/fix-race-condition-in-dnstap' into 'master'
Fix race condition in cleanup part of dns_dt_create()

See merge request isc-projects/bind9!1323
2019-01-14 05:42:25 -05:00
Witold Kręcicki
4b5337e06b Add CHANGES entry for GL!1323 2019-01-14 11:28:47 +01:00
Ondřej Surý
482dd7eed3 Fix race condition in cleanup part of dns_dt_create() 2019-01-14 11:28:47 +01:00
Evan Hunt
3b1a914395 Merge branch 'each-fix-dnssec-test-error' into 'master'
DNSSEC test error

See merge request isc-projects/bind9!1330
2019-01-13 21:09:02 -05:00
Evan Hunt
82e83d5dc7 fix testing errors
- the checkprivate function in the dnssec test set ret=0, erasing
  results from previous tests and making the test appear to have passed
  when it shouldn't have
- checkprivate needed a delay loop to ensure there was time for all
  private signing records to be updated before the test
2019-01-13 17:50:08 -08:00
Mark Andrews
5da2d171df Merge branch 'u/fanf2/rndc-alphabetize' into 'master'
cleanup: alphabetize rndc command dispatch

See merge request isc-projects/bind9!1328
2019-01-13 20:25:41 -05:00
Tony Finch
66be4108bf cleanup: alphabetize rndc command dispatch 2019-01-11 15:34:02 +00:00
Mark Andrews
61f5306226 Merge branch '801-silence-coverity-issues' into 'master'
Resolve "Silence Coverity Issues"

Closes #801

See merge request isc-projects/bind9!1285
2019-01-09 23:02:16 -05:00
Mark Andrews
bd529b1f30 silence coverity issues; move isc_refcount_decrement out of INSIST 2019-01-10 14:42:28 +11:00
Ondřej Surý
67fbbc4e0c Merge branch '709-get-rid-of-message-catalogs' into 'master'
Resolve "Get rid of message catalogs"

Closes #709

See merge request isc-projects/bind9!1131
2019-01-09 18:07:56 -05:00
Ondřej Surý
01b75a9b5b Add CHANGES entry for GL #709 2019-01-09 23:45:14 +01:00
Ondřej Surý
189b8b76d4 Document removal of message catalogs in the release notes 2019-01-09 23:44:26 +01:00
Ondřej Surý
e2cdf066ea Remove message catalogs 2019-01-09 23:44:26 +01:00
Mark Andrews
f8965a5588 Merge branch '798-dlz-build_querystring-broken' into 'master'
Resolve "DLZ build_querystring broken"

Closes #798

See merge request isc-projects/bind9!1281
2019-01-09 04:21:26 -05:00
Mark Andrews
4c7e6e0799 correctly split query string; cleanups 2019-01-09 19:57:46 +11:00
Mark Andrews
f9d9c5686d Merge branch '784-bind-9-12-3-p1-fatal-error' into 'master'
Resolve "bind 9.12.3-P1 fatal error"

Closes #784

See merge request isc-projects/bind9!1283
2019-01-09 03:46:43 -05:00
Mark Andrews
9dd39d5385 add CHANGES 2019-01-09 19:28:16 +11:00
Mark Andrews
ca977e3976 update refreshkeytime 2019-01-09 19:27:40 +11:00
Mark Andrews
43bfd4cccc Merge branch 'marka-maybe_numeric-and-nul' into 'master'
maybe_numeric failed to handle NUL in text region.

Closes #807

See merge request isc-projects/bind9!1319
2019-01-09 02:58:23 -05:00
Mark Andrews
ee23780246 maybe_numeric failed to handle NUL in text region. 2019-01-09 18:33:42 +11:00
Mark Andrews
287bb7b482 Merge branch 'marka-fail-when-required-field-is-missing' into 'master'
Ensure base64/base32/hex fields in DNS records that should be non-empty are.

See merge request isc-projects/bind9!1318
2019-01-09 02:27:37 -05:00
Mark Andrews
5e8b772ad1 Ensure base64/base32/hex fields in DNS records that should be non-empty are. 2019-01-09 18:04:21 +11:00
Mark Andrews
5114270fa7 Merge branch '804-large-nsec3-responses-cause-failure-in-adding-records-to-ncache-and-eventually-formerr-instead-of-nxdomain' into 'master'
Resolve "Large NSEC3 responses cause failure in adding records to ncache and, eventually, FORMERR (instead of NXDOMAIN)"

Closes #804

See merge request isc-projects/bind9!1295
2019-01-09 00:06:30 -05:00
Mark Andrews
3328116b57 add CHANGES entry 2019-01-09 15:54:04 +11:00
Mark Andrews
604889e627 allow for up 100 records or 64K of data to be in a ncache entry 2019-01-09 15:53:32 +11:00
Mark Andrews
8e6af477dd Merge branch '804-large-nsec3-responses-cause-failure-in-adding-records-to-ncache-and-eventually-formerr-instead-of-nxdomain-2' into 'master'
Resolve "Large NSEC3 responses cause failure in adding records to ncache and, eventually, FORMERR (instead of NXDOMAIN)"

Closes #804

See merge request isc-projects/bind9!1298
2019-01-08 23:39:42 -05:00
Mark Andrews
188c184381 add CHANGES 2019-01-09 15:19:42 +11:00
Mark Andrews
0c42a9c0ab explictly convert ISC_R_NOSPACE from dns_message_parse to DNS_R_FORMERR and remove from dns_result_torcode 2019-01-09 15:19:42 +11:00
Evan Hunt
c6ac1b092d Merge branch '812-cookie-test-failed' into 'master'
Resolve "cookie test failed."

Closes #812

See merge request isc-projects/bind9!1300
2019-01-08 23:15:40 -05:00
Mark Andrews
8a8d378def wait longer for dump to complete 2019-01-08 23:04:22 -05:00
Ondřej Surý
10d8f3194f Merge branch 'ondrej/disable-CI-in-release-branches' into 'master'
Run the regular pipelines only for merge requests, and run only the Debian sid...

See merge request isc-projects/bind9!1309
2019-01-08 08:57:13 -05:00
Ondřej Surý
24961f6068 Run the regular pipelines only for merge requests, and run only the Debian sid build for release branches 2019-01-08 14:31:07 +01:00
Michał Kępień
1b409b8cfc Merge branch '692-dig-fix-cleanup-upon-an-error-before-tcp-socket-creation' into 'master'
Fix cleanup upon an error before TCP socket creation

Closes #692

See merge request isc-projects/bind9!1100
2019-01-08 05:57:10 -05:00
Michał Kępień
3242cb53ec Add CHANGES entry
5123.	[bug]		dig could hang indefinitely after encountering an error
			before creating a TCP socket. [GL #692]
2019-01-08 11:17:39 +01:00
Michał Kępień
13975b32c6 Fix cleanup upon an error before TCP socket creation
When a query times out after a socket is created and associated with a
given dig_query_t structure, calling isc_socket_cancel() causes
connect_done() to be run, which in turn takes care of all necessary
cleanups.  However, certain errors (e.g. get_address() returning
ISC_R_FAMILYNOSUPPORT) may prevent a TCP socket from being created in
the first place.  Since force_timeout() may be used in code handling
such errors, connect_timeout() needs to properly clean up a TCP query
which is not associated with any socket.  Call clear_query() from
connect_timeout() after attempting to send a TCP query to the next
available server if the timed out query does not have a socket
associated with it, in order to prevent dig from hanging indefinitely
due to the dig_query_t structure not being detached from its parent
dig_lookup_t structure.
2019-01-08 11:17:39 +01:00
Michał Kępień
c108fc5c6e Refactor code sending a query to the next server upon a timeout
When a query times out and another server is available for querying
within the same lookup, the timeout handler - connect_timeout() - is
responsible for sending the query to the next server.  Extract the
relevant part of connect_timeout() to a separate function in order to
improve code readability.
2019-01-08 11:17:39 +01:00
Michał Kępień
ef1da8731b Remove dead code handling address family mismatches for TCP sockets
Before commit c2ec022f57, using the "-b"
command line switch for dig did not disable use of the other address
family than the one to which the address supplied to that option
belonged to.  Thus, bind9_getaddresses() could e.g. prepare an
isc_sockaddr_t structure for an IPv6 address when an IPv4 address has
been passed to the "-b" command line option.  To avoid attempting the
impossible (e.g. querying an IPv6 address from a socket bound to an IPv4
address), a certain code block in send_tcp_connect() checked whether the
address family of the server to be queried was the same as the address
family of the socket set up for sending that query; if there was a
mismatch, that particular server address was skipped.

Commit c2ec022f57 made
bind9_getaddresses() fail upon an address family mismatch between the
address the hostname passed to it resolved to and the address supplied
to the "-b" command line option.  Such failures were fatal to dig back
then.

Commit 7f65860391 made
bind9_getaddresses() failures non-fatal, but also ensured that a
get_address() failure in send_tcp_connect() still causes the given query
address to be skipped (and also made such failures trigger an early
return from send_tcp_connect()).

Summing up, the code block handling address family mismatches in
send_tcp_connect() has been redundant since commit
c2ec022f57.  Remove it.
2019-01-08 11:17:39 +01:00
Michał Kępień
dca1652458 Merge branch '315-track-forwarder-timeouts-in-fetch-contexts' into 'master'
Track forwarder timeouts in fetch contexts

Closes #315

See merge request isc-projects/bind9!826
2019-01-08 05:00:03 -05:00
Michał Kępień
1df9ca9e6a Add CHANGES entry
5122.	[bug]		In a "forward first;" configuration, a forwarder
			timeout did not prevent that forwarder from being
			queried again after falling back to full recursive
			resolution. [GL #315]
2019-01-08 08:29:54 +01:00
Michał Kępień
33350626f9 Track forwarder timeouts in fetch contexts
Since following a delegation resets most fetch context state, address
marks (FCTX_ADDRINFO_MARK) set inside lib/dns/resolver.c are not
preserved when a delegation is followed.  This is fine for full
recursive resolution but when named is configured with "forward first;"
and one of the specified forwarders times out, triggering a fallback to
full recursive resolution, that forwarder should no longer be consulted
at each delegation point subsequently reached within a given fetch
context.

Add a new badnstype_t enum value, badns_forwarder, and use it to mark a
forwarder as bad when it times out in a "forward first;" configuration.
Since the bad server list is not cleaned when a fetch context follows a
delegation, this prevents a forwarder from being queried again after
falling back to full recursive resolution.  Yet, as each fetch context
maintains its own list of bad servers, this change does not cause a
forwarder timeout to prevent that forwarder from being used by other
fetch contexts.
2019-01-08 08:29:54 +01:00
Mark Andrews
a38b31ccf9 Merge branch 'marka-fix-stub_dlz_allowzonexfr' into 'master'
return ISC_R_NOTFOUND when name does not match the zone name

See merge request isc-projects/bind9!1299
2019-01-06 23:06:13 -05:00
Mark Andrews
bb57c7f775 add CHANGES 2019-01-07 14:38:48 +11:00
Mark Andrews
402190df18 return ISC_R_NOTFOUND when name does not match the zone name 2019-01-06 22:21:24 -05:00
Evan Hunt
3485fe4b86 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1297
2019-01-03 14:10:30 -05:00
Evan Hunt
5cdc63254b placeholder 2019-01-03 11:10:05 -08:00
Evan Hunt
792692f86d Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1294
2019-01-02 20:30:47 -05:00
Evan Hunt
32edbd7859 placeholder 2019-01-02 17:30:18 -08:00
Mark Andrews
971c01ad19 Merge branch 'indenting' into 'master'
indenting

See merge request isc-projects/bind9!1286
2019-01-01 19:41:35 -05:00
Mark Andrews
c69ad95238 indenting 2019-01-02 10:56:59 +11:00
Mark Andrews
18e393bd90 Merge branch 'copyrights' into 'master'
update copyrights

See merge request isc-projects/bind9!1287
2019-01-01 18:53:45 -05:00
Mark Andrews
dc64b70616 update copyrights 2019-01-02 10:20:43 +11:00
Mark Andrews
3a754d4bf8 Merge branch 'marka-readme-typo' into 'master'
fix typo in readme

See merge request isc-projects/bind9!1282
2018-12-26 20:38:21 -05:00
Mark Andrews
4af0d9145a s/now/no/ 2018-12-27 12:37:11 +11:00
Evan Hunt
1b95cb79bb Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1277
2018-12-20 18:38:02 -05:00
Evan Hunt
5ea712d964 placeholder 2018-12-20 15:37:18 -08:00
Evan Hunt
8f02762b81 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1276
2018-12-20 16:26:49 -05:00
Evan Hunt
5b63b595fc placeholder 2018-12-20 13:26:14 -08:00
Ondřej Surý
285d5b125b Merge branch 'ondrej/git-replay-merge-script-update' into 'master'
Update git-replay-merge.sh script

See merge request isc-projects/bind9!1275
2018-12-20 05:51:39 -05:00
Ondřej Surý
5b29b6889b Update git-replay-merge.sh script 2018-12-20 11:48:41 +01:00
Ondřej Surý
6d577430ce Merge branch '768-add-description-to-ldap-schema' into 'master'
Add optional description field to LDAP schema

Closes #768

See merge request isc-projects/bind9!1267
2018-12-20 04:14:53 -05:00
Roland Gruber
83903f6f5e Add optional description field to LDAP schema 2018-12-20 09:47:07 +01:00
Mark Andrews
4075347c47 Merge branch '778-named-checkconf-crashes-in-name-c' into 'master'
Resolve "named-checkconf crashes in name.c"

Closes #778

See merge request isc-projects/bind9!1235
2018-12-20 03:35:29 -05:00
Mark Andrews
b75970efa3 named-checkconf triggered a assertion when a mirror zone had a bad name 2018-12-20 13:19:18 +11:00
Ondřej Surý
314a25e4d4 Merge branch 'ondrej/flycheck-fix' into 'master'
Fix the cppcheck include path for flycheck

See merge request isc-projects/bind9!1264
2018-12-19 18:14:29 -05:00
Ondřej Surý
1a4559030e Fix the cppcheck include path for flycheck 2018-12-19 18:14:17 -05:00
Ondřej Surý
301f2fbedc Merge branch '787-set-the-clang-define-to-1' into 'master'
__SANITIZE_ADDRESS__ needs to be defined to 1

See merge request isc-projects/bind9!1262
2018-12-19 18:14:00 -05:00
Ondřej Surý
ff7c868f25 __SANITIZE_ADDRESS__ needs to be defined to 1 2018-12-19 22:02:37 +01:00
Ondřej Surý
1a93e5bd3e Merge branch 'ondrej/add-emacs-flycheck-mode-configuration' into 'master'
Add emacs flycheck mode configuration

See merge request isc-projects/bind9!1165
2018-12-19 15:50:00 -05:00
Ondřej Surý
272c065268 Add emacs .dir-locals.el settings for flycheck mode 2018-12-19 17:03:37 +01:00
Matthijs Mekking
191b12e304 Merge branch '783-dnssec-signzone-unsupported-algorithms' into 'master'
Resolve "Allow unsupported algorithms in zone when not used for signing"

Closes #783

See merge request isc-projects/bind9!1250
2018-12-19 09:10:09 -05:00
Matthijs Mekking
a7de66142c Artificial change to retry pipeline 2018-12-19 14:52:23 +01:00
Matthijs Mekking
17cdde1e56 Replace DSA with Reserved algorithm 2018-12-19 12:54:57 +01:00
Matthijs Mekking
cefc3706a0 Update copyrights 2018-12-19 12:54:57 +01:00
Matthijs Mekking
5ca649967e Move REQUIRE outside comment unsupported alg 2018-12-19 12:54:57 +01:00
Matthijs Mekking
34c0948aa7 Add DSA key to copyrights 2018-12-19 12:54:57 +01:00
Matthijs Mekking
6afa8a77d3 Update changefile 2018-12-19 12:54:57 +01:00
Matthijs Mekking
1dd11fc754 Allow unsupported alg in zone /w dnssec-signzone
dnssec-signzone should sign a zonefile that contains a DNSKEY record
with an unsupported algorithm.  Current behavior is that it will
fail, hitting a fatal error.  The fix detects unsupported algorithms
and will not try to add it to the keylist.

Also when determining the maximum iterations for NSEC3, don't take
into account DNSKEY records in the zonefile with an unsupported
algorithm.
2018-12-19 12:54:31 +01:00
Matthijs Mekking
6d976b37c1 Add dnssec-signzone tests with unsupported alg
dnssec-signzone should sign a zonefile that contains a DNSKEY record
with an unsupported algorithm.
2018-12-19 12:54:31 +01:00
Ondřej Surý
b04842c057 Merge branch '787-use-correct-define' into 'master'
gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define

Closes #787

See merge request isc-projects/bind9!1255
2018-12-19 06:48:48 -05:00
Ondřej Surý
8903d68d69 gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define 2018-12-19 12:24:59 +01:00
Witold Krecicki
37c2d69547 Merge branch 'wpk-rndc-reload-in-tests' into 'master'
Add a status line to rndc status notifying that server is being reloaded/reconfigured; use it in tests

See merge request isc-projects/bind9!1149
2018-12-19 06:18:46 -05:00
Witold Kręcicki
6e12939d63 CHANGES notes 2018-12-19 11:35:40 +01:00
Witold Kręcicki
6d50138405 Use rndc_reload in tests, make sure that reload is complete before continuing 2018-12-19 11:33:37 +01:00
Witold Kręcicki
517449e0e6 Add a status line to rndc status notifying that server is being reloaded/reconfigured 2018-12-19 11:32:21 +01:00
Ondřej Surý
35d495db68 Merge branch '787-disable-rtld_deepbind-when-compiled-under-asan' into 'master'
Resolve "RTLD_DEEPBIND and AddressSanitizer aren't compatible"

Closes #787

See merge request isc-projects/bind9!1251
2018-12-19 04:46:53 -05:00
Ondřej Surý
cad6b39cab Disable RTLD_DEEPBIND when compiled under AddressSanitizer 2018-12-19 09:59:40 +01:00
Ondřej Surý
e1ce3a3d42 Define __ADDRESS_SANITIZER__ if compiling under clang's AddressSanitizer 2018-12-19 09:54:37 +01:00
Ondřej Surý
16d486ec59 Merge branch '781-fix-python-check-in-configure-script' into 'master'
Resolve "configure script in BIND 9.13.5 release fails to detect python"

Closes #781

See merge request isc-projects/bind9!1248
2018-12-18 10:56:21 -05:00
Ondřej Surý
99cf0faec0 Add some combinations of --with-python=<path>/--with-python/--without-python to GitLab CI 2018-12-18 16:08:20 +01:00
Ondřej Surý
3951cb053b When --with-python is given to configure, use default search list for python binaries instead of 'yes' 2018-12-18 16:08:20 +01:00
Ondřej Surý
41478d0af6 Merge branch 'ondrej-retry-test-jobs' into 'master'
For system tests, retry twice before failing

See merge request isc-projects/bind9!1249
2018-12-18 10:06:01 -05:00
Ondřej Surý
b6538b5488 For system tests, retry twice before failing 2018-12-18 15:33:59 +01:00
Witold Krecicki
d77ac39370 Merge branch 'wpk-separate-common-stuff-conf-sh' into 'master'
Get common stuff out of bin/tests/system/conf.sh.{in,win32} into conf.sh.common

See merge request isc-projects/bind9!1241
2018-12-18 08:57:17 -05:00
Witold Kręcicki
fee890461b Get common stuff out of bin/tests/system/conf.sh.{in,win32} into conf.sh.common 2018-12-18 08:57:05 -05:00
Ondřej Surý
6ea19e66c3 Merge branch '782-add-support-for-msys2-in-stop.pl-script' into 'master'
Properly detect msys/msys2 environment in the stop.pl script.

See merge request isc-projects/bind9!1247
2018-12-18 08:46:03 -05:00
Ondřej Surý
808dac0760 Properly detect msys/msys2 environment in the stop.pl script. 2018-12-18 14:27:56 +01:00
Ondřej Surý
8b10b07d20 Merge branch '785-fix-posix-shell-autoconf-macro' into 'master'
Break out of loop when first POSIX-compatible shell is found

Closes #785

See merge request isc-projects/bind9!1245
2018-12-18 07:29:12 -05:00
Ondřej Surý
cc0a3c5d3c Break out of loop when first POSIX-compatible shell is found 2018-12-18 13:02:00 +01:00
Evan Hunt
39f6d33002 Merge branch 'each-win-fix2' into 'master'
fix windows build error

See merge request isc-projects/bind9!1246
2018-12-17 18:14:27 -05:00
Evan Hunt
b269c7e4a0 CHANGES 2018-12-17 17:10:33 -05:00
Evan Hunt
de13354caf only the debug build was fixed previously; release needs fixing too 2018-12-17 17:10:33 -05:00
Ondřej Surý
90f1446253 Merge branch '782-revert-cygwin-grep-CRLF-issue' into 'master'
Revert "Merge branch '782-cygwin-grep-CRLF-issue' into 'master'"

See merge request isc-projects/bind9!1242
2018-12-17 06:57:44 -05:00
Ondřej Surý
7a721f983e Revert "Merge branch '782-cygwin-grep-CRLF-issue' into 'master'"
This reverts commit 4af9f97189, reversing
changes made to 0289f3f281.
2018-12-17 12:23:14 +01:00
Evan Hunt
4af9f97189 Merge branch '782-cygwin-grep-CRLF-issue' into 'master'
Resolve "current version of cygwin grep causes tests to fail when grepping for end of line character"

Closes #782

See merge request isc-projects/bind9!1230
2018-12-14 21:47:23 -05:00
Curtis Blackburn
2ec746dafe minor fixes to dns64 and rndc CRLF fix. rpzrecurse failure
will be addressed in a separate issue
2018-12-14 18:22:58 -08:00
Curtis Blackburn
9fc68285ef more CRLF fixes (dns64, rndc, rpzrecurse) 2018-12-14 18:22:58 -08:00
Curtis Blackburn
bdbf6ede3a missed one in the digdelv test 2018-12-14 18:22:58 -08:00
Curtis Blackburn
ba1b9ca4d4 digdelv test fixed for CRLF issue 2018-12-14 18:22:58 -08:00
Curtis Blackburn
18e8835044 windows CRLF issues fixed in builtin test 2018-12-14 18:22:58 -08:00
Mark Andrews
0289f3f281 Merge branch '779-named-checkconf-crashes-in-parser-c' into 'master'
Resolve "named-checkconf crashes in parser.c"

Closes #779

See merge request isc-projects/bind9!1234
2018-12-14 14:47:32 -05:00
Mark Andrews
53a33f7365 pass the correct object to cfg_obj_log 2018-12-14 16:29:02 +11:00
Mark Andrews
17ce0b373f Merge branch '742-isc-support-13767-nsec3-typemap-improperly-includes-dnskey-rrset-instead-of-ignoring-it-as-out-of-zone' into 'master'
Resolve "[ISC-support #13767] NSEC3 typemap improperly includes DNSKEY RRset instead of ignoring it as out-of-zone"

Closes #742

See merge request isc-projects/bind9!1231
2018-12-13 21:53:53 -05:00
Mark Andrews
85da986d68 add CHANGES 2018-12-14 13:21:35 +11:00
Mark Andrews
f2f7711977 add unit tests for dns_rdatatype_atcname, dns_rdatatype_atparent and iszonecutauth 2018-12-14 13:21:35 +11:00
Mark Andrews
7e4b82103b check that DNSKEY and other occluded data are excluded from the delegating bitmap 2018-12-14 12:48:55 +11:00
Mark Andrews
f4ceb12b69 create dns_rdatatype_atcname to split records that can appear along side CNAME from DNSSEC; dns_rdatatype_iszonecutauth allowed too many types 2018-12-14 12:48:55 +11:00
Mark Andrews
d78d405d1a Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!1228
2018-12-13 01:30:09 -05:00
Mark Andrews
fed3e7a815 placeholder 2018-12-13 16:49:12 +11:00
Evan Hunt
2da3caf339 Merge branch 'marka-tabify-changes-precheck' into 'master'
tabify changes precheck

See merge request isc-projects/bind9!1220
2018-12-13 00:22:21 -05:00
Mark Andrews
730015f33e white space 2018-12-12 21:10:22 -08:00
Mark Andrews
87b3b46096 tabify-changes precheck 2018-12-12 21:10:22 -08:00
Ondřej Surý
a5678ed78f Merge branch 'ondrej/rename-the-envvar-to-BUILD_PARALLEL_JOBS' into 'master'
Rename the GitLab CI environment variable to BUILD_PARALLEL_JOBS

See merge request isc-projects/bind9!1223
2018-12-12 16:58:35 -05:00
Ondřej Surý
e20d5e4dd2 Rename the GitLab CI environment variable to BUILD_PARALLEL_JOBS 2018-12-12 15:57:36 -05:00
Ondřej Surý
bb60797799 Merge branch 'ondrej/add-ubuntu-to-build-and-test-jobs' into 'master'
Add Ubuntu Xenial and Bionic to build and test jobs in the GitLab CI

See merge request isc-projects/bind9!1221
2018-12-12 09:35:59 -05:00
Ondřej Surý
6e53bb4e09 fixup! Add Ubuntu Xenial and Bionic to GitLab CI jobs 2018-12-12 15:05:12 +01:00
Ondřej Surý
a32d2360f7 Add Ubuntu Xenial and Bionic to GitLab CI jobs 2018-12-12 14:52:29 +01:00
Mark Andrews
d844959a44 Merge branch '760-the-notify-system-test-incorrectly-detects-startup-notify-rate-error' into 'master'
Resolve "The notify system test incorrectly detects startup notify rate error."

Closes #760

See merge request isc-projects/bind9!1179
2018-12-11 18:19:24 -05:00
Mark Andrews
47a4e0eeaa check that the time between notify messages is not too small 2018-12-12 09:39:00 +11:00
Matthijs Mekking
ff20b8040d Merge branch '628-remove-support-for-insecure-rsamd5' into 'master'
Resolve "Remove support for insecure RSAMD5"

Closes #628

See merge request isc-projects/bind9!1106
2018-12-11 09:21:07 -05:00
Ondřej Surý
0ef2853c0d Add CHANGES entry for GL #628 2018-12-11 11:32:24 +01:00
Ondřej Surý
abe39991be Add release notes for RSAMD5 removal. 2018-12-11 11:32:24 +01:00
Ondřej Surý
5cc06e475a Documentation update with newer algorithms tham RSAMD5 and RSASHA1 2018-12-11 11:32:24 +01:00
Ondřej Surý
826c335980 Remove outdated bin/tests/optional/dst_test test 2018-12-11 11:32:24 +01:00
Ondřej Surý
a2e38f758d Add lib/dns/tests/testdata/dnstap/dnstap.file to .gitignore 2018-12-11 11:32:24 +01:00
Ondřej Surý
e69dc0dbc7 Remove RSAMD5 support 2018-12-11 11:32:24 +01:00
Ondřej Surý
74f895740c Merge branch '628-refactor-digdelv-system-test' into 'master'
Refactor digdelv system test

See merge request isc-projects/bind9!1190
2018-12-11 05:16:59 -05:00
Ondřej Surý
bc12c52e82 Run the digdelv tests with set -e enabled 2018-12-11 10:21:47 +01:00
Ondřej Surý
351efd8812 Update digdelv system test to not use static RSAMD5 key and make scripts shellcheck clean 2018-12-11 10:21:40 +01:00
Ondřej Surý
7ff7de0609 Merge branch '628-refactor-synthfromdnssec-system-test' into 'master'
Refactor synthfromdnssec system test

See merge request isc-projects/bind9!1193
2018-12-11 04:19:52 -05:00
Ondřej Surý
f5785f97fc Refactor synthfromdnssec system test to use $DEFAULT_ALGORITHM, be shellcheck clean and run under set -e 2018-12-11 09:44:08 +01:00
Ondřej Surý
e71bbde57d Merge branch '628-refactor-sfcache-test' into 'master'
Refactor sfcache system test

See merge request isc-projects/bind9!1184
2018-12-11 03:43:14 -05:00
Ondřej Surý
e1bf5624fb Run the sfcache system tests with set -e enabled 2018-12-11 09:27:16 +01:00
Ondřej Surý
f566010717 sfcache system test: Remove RSAMD5 usage and make script shellcheck compliant 2018-12-11 09:27:16 +01:00
Ondřej Surý
7e07d05ae7 Replace RSAMD5 keys with keys using DEFAULT_ALGORITHM variable from conf.sh 2018-12-11 09:27:16 +01:00
Ondřej Surý
211d83b0cd Merge branch '628-refactor-dnssec-system-test' into 'master'
Refactor dnssec system test

See merge request isc-projects/bind9!1191
2018-12-10 14:01:44 -05:00
Ondřej Surý
aeebcb4ae8 Run the dnssec system tests with set -e enabled 2018-12-10 19:47:32 +01:00
Ondřej Surý
ca7cadfa92 dnssec system test: Remove RSAMD5 usage and make script shellcheck compliant 2018-12-10 19:47:32 +01:00
Ondřej Surý
a160fecaa1 Replace RSAMD5 keys with keys using DEFAULT_ALGORITHM variable from conf.sh 2018-12-10 09:16:46 -08:00
Evan Hunt
c0eb02d435 Merge branch '756-dyndb-system-test-failing-intermittently' into 'master'
Resolve "dyndb system test failing intermittently."

Closes #756

See merge request isc-projects/bind9!1210
2018-12-10 12:05:14 -05:00
Mark Andrews
3bca52ca07 allow a small about of time for the syncptr event to be processed 2018-12-10 16:59:27 +11:00
Mark Andrews
e5da71f746 Merge branch 'michal-extend-dname-dnssec-tests' into 'master'
Extend DNAME DNSSEC tests

See merge request isc-projects/bind9!1205
2018-12-10 00:51:06 -05:00
Michał Kępień
adbca54079 Check that DNAME is not treated as a delegation when signing 2018-12-09 23:12:41 -05:00
Mark Andrews
6b470bbf42 verify that auto-dnssec maintain generates and signs NSEC3 records with DNAME at the apex 2018-12-09 23:12:41 -05:00
Mark Andrews
06e218c421 verify that dnssec-signzone generates NSEC3 records with DNAME at the apex 2018-12-09 23:12:41 -05:00
Mark Andrews
4ccff3bbed Merge branch 'michal-zone_sign-error-logging' into 'master'
Log CHECK() errors in zone_sign()

See merge request isc-projects/bind9!1206
2018-12-09 23:11:47 -05:00
Mark Andrews
b108376a10 log a error if we don't explicitly know that a error has been logged in zone_sign 2018-12-10 14:57:11 +11:00
Evan Hunt
8b17f364a9 Merge branch 'each-win32-fix' into 'master'
add missing hooks.c and hooks.h to project files, remove missing symbols

See merge request isc-projects/bind9!1207
2018-12-07 13:44:21 -05:00
Evan Hunt
c6527aedc7 fix win32 build
- add missing hooks.h and hooks.c to project files
- remove extraneous symbols from libns.def
2018-12-07 10:12:00 -08:00
Tinderbox User
882ad18c5e Merge branch 'prep-release' 2018-12-07 03:41:27 +00:00
Tinderbox User
5bd855251c prep 9.13.5 2018-12-07 03:41:19 +00:00
Evan Hunt
cbde34e7a3 Merge branch 'each-check-cfg' into 'master'
checklibs needs to grep for the cfg_* prefix in lib/isccfg

See merge request isc-projects/bind9!1201
2018-12-06 21:07:12 -05:00
Evan Hunt
ab7356a7de checklibs needs to grep for the cfg_* prefix in lib/isccfg 2018-12-06 21:05:55 -05:00
Evan Hunt
90b773134c Merge branch '770-building-with-geoip-is-currently-broken-on-master' into 'master'
Resolve "Building with GEOIP is currently broken on master."

See merge request isc-projects/bind9!1202
2018-12-06 21:05:23 -05:00
Mark Andrews
b2aca96c27 move geoip to parser.c 2018-12-07 12:50:03 +11:00
Mark Andrews
388bfdb945 Merge branch 'michal-befix-squashed' into 'master'
Fix bottom of zone determination.

Closes #771

See merge request isc-projects/bind9!1198
2018-12-06 19:38:33 -05:00
Mark Andrews
c8e92d3e45 add CHANGES and release notes entries. 2018-12-07 11:21:47 +11:00
Mark Andrews
9eec02a81f Properly detect bottom of zone when sign_a_node() is not called 2018-12-07 11:20:16 +11:00
Evan Hunt
0c0536a1e4 Merge branch 'each-fix-macos-build' into 'master'
fix shared library build on darwin

See merge request isc-projects/bind9!1197
2018-12-06 18:58:14 -05:00
Evan Hunt
115736b3f5 fix shared library build on darwin 2018-12-06 18:57:53 -05:00
Mark Andrews
5e2cd91321 Merge branch '769-host-u-documented-in-manpage-but-disabled-in-code' into 'master'
Resolve ""host -U" documented in manpage, but disabled in code"

Closes #769

See merge request isc-projects/bind9!1194
2018-12-06 16:10:45 -05:00
Mark Andrews
9586c3a696 add CHANGES 2018-12-07 07:56:43 +11:00
Andreas Hasenack
665618698e add -U to preparse and usage 2018-12-07 07:43:52 +11:00
Evan Hunt
71e54bfe0f Merge branch '15-filter-aaaa-module' into 'master'
first module: filter-aaaa

See merge request isc-projects/bind9!799
2018-12-06 13:57:49 -05:00
Evan Hunt
fa666f5d88 CHANGES, release notes 2018-12-06 10:36:50 -08:00
Michał Kępień
0e12988dd6 make hook actions return an enum instead of a bool
Use an enum instead of a bool for the return type of hook actions in
order to facilitate adding further hook processing models in the future.
2018-12-06 10:36:50 -08:00
Evan Hunt
f70a84537d revise hooks.h comments 2018-12-06 10:36:50 -08:00
Evan Hunt
c63ead9d96 add basic plugins documentation 2018-12-06 10:36:50 -08:00
Michał Kępień
4234968798 add a function for processing a list of configured plugins
Add a new libisccfg function, cfg_pluginlist_foreach(), which allows an
arbitrary callback to be invoked for every "plugin" stanza present in a
configuration object.  Use this function for both loading plugins and
checking their configuration in order to reduce duplication of
configuration processing code present in bin/named/server.c and
lib/bind9/check.c.
2018-12-06 10:36:50 -08:00
Evan Hunt
fd20f10d52 name change from "hook modules" to "plugins"
- "hook" is now used only for hook points and hook actions
- the "hook" statement in named.conf is now "plugin"
- ns_module and ns_modlist are now ns_plugin and ns_plugins
- ns_module_load is renamed ns_plugin_register
- the mandatory functions in plugin modules (hook_register,
  hook_check, hook_version, hook_destroy) have been renamed
2018-12-06 10:36:50 -08:00
Evan Hunt
8da0c0e7d5 eliminate ns_hookctx structure, pass mctx/lctx/view directly 2018-12-06 10:36:44 -08:00
Evan Hunt
7a47e4d85f restore filter-aaaa syntax checking
- added functionality to check hook parameters in named-checkconf,
  and restored the checkconf tests that were removed from the
  filter-aaaa test.
2018-12-06 10:29:12 -08:00
Evan Hunt
b94945e606 refactor to support multiple module instances
- use a per-view module list instead of global hook_modules
- create an 'instance' pointer when registering modules, store it in
  the module structure, and use it as action_data when calling
  hook functions - this enables multiple module instances to be set
  up in parallel
- also some nomenclature changes and cleanup
2018-12-06 10:29:12 -08:00
Evan Hunt
9df0bdc99c add additional hook points, plus some minor refactoring
- added some hook points that will be needed for a dns64 module later
- moved some code from the beginning of query_respond() to
  the end of query_prepresponse(); this has no effect on functionality
  but means we can have a hook point at the top of query_respond(),
  which seems nicer
- compressed duplicated code into query_zerottl_refetch() function
- added a qctx->answered flag so that a module can prevent
  query_addrrset() from being called from query_respond() when
  it's already been called from the module.
2018-12-06 10:29:12 -08:00
Michał Kępień
baa38d6e94 refactor response filtering code in bin/hooks/filter-aaaa.c 2018-12-06 10:29:12 -08:00
Evan Hunt
0b988256c7 copy ns_hook objects before adding them to a hook table
- this is necessary because adding the same hook to multiple views
  causes the ISC_LIST link value to become inconsistent; it isn't
  noticeable when only one hook action is ever registered at a
  given hook point, but it will break things when there are two.
2018-12-06 10:29:12 -08:00
Evan Hunt
74683fbc3b use entirely local persistent data in modules
- eliminate qctx->hookdata and client->hookflags.
- use a memory pool to allocate data blobs in the filter-aaaa module,
  and associate them with the client address in a hash table
- instead of detaching the client in query_done(), mark it for deletion
  and then call ns_client_detach() from qctx_destroy(); this ensures
  that it will still exist when the QCTX_DESTROYED hook point is
  reached.
2018-12-06 10:29:12 -08:00
Evan Hunt
8725f57371 refactor to remove dead code in query_respond_any() 2018-12-06 10:29:12 -08:00
Evan Hunt
427e9ca357 clear AD flag when altering response messages
- the AD flag was not being cleared correctly when filtering
- enabled dnssec valdiation in the filter-aaaa test to confirm this
  works correctly now
2018-12-06 10:29:11 -08:00
Evan Hunt
055bf2665c improve hook processing macros
- use a get_hooktab() function to determine the hook table.
- PROCESS_HOOK now jumps to a cleanup tag on failure
- add PROCESS_ALL_HOOKS in query.c, to run all hook functions at
  a specified hook point without stopping. this is to be used for
  intiialization and destruction functions that must run in every
  module.
- 'result' is set in PROCESS_HOOK only when a hook function
  interrupts processing.
- revised terminology: a "callback" is now a "hook action"
- remove unused NS_PROCESS_HOOK and NS_PROCESS_HOOK_VOID macros.
2018-12-06 10:29:11 -08:00
Evan Hunt
81f58e2ea2 enable modules to store data in qctx
- added a 'hookdata' array to qctx to store pointers to up to
  16 blobs of data which are allocated by modules as needed.
  each module is assigned an ID number as it's loaded, and this
  is the index into the hook data array. this is to be used for
  holding persistent state between calls to a hook module for a
  specific query.
- instead of using qctx->filter_aaaa, we now use qctx->hookdata.
  (this was the last piece of filter-aaaa specific code outside the
  module.)
- added hook points for qctx initialization and destruction. we get
  a filter-aaaa data pointer from the mempool when initializing and
  store it in the qctx->hookdata table; return to to the mempool
  when destroying the qctx.
- link the view to the qctx so that detaching the client doesn't cause
  hooks to fail
- added a qctx_destroy() function which must be called after qctx_init;
  this calls the QCTX_DESTROY hook and detaches the view
- general cleanup and comments
2018-12-06 10:29:11 -08:00
Evan Hunt
9911c835d3 add a parser to filter-aaaa.so and pass in the parameters
- make some cfg-parsing functions global so they can be run
  from filter-aaaa.so
- add filter-aaaa options to the hook module's parser
- mark filter-aaaa options in named.conf as obsolete, remove
  from named and checkconf, and update the filter-aaaa test not to
  use checkconf anymore
- remove filter-aaaa-related struct members from dns_view
2018-12-06 10:29:11 -08:00
Evan Hunt
d2f4644388 add hook statement to configuration parser
- allow multiple "hook" statements at global or view level
- add "optional bracketed text" type for optional parameter list
- load hook module from specified path rather than hardcoded path
- add a hooktable pointer (and a callback for freeing it) to the
  view structure
- change the hooktable functions so they no longer update ns__hook_table
  by default, and modify PROCESS_HOOK so it uses the view hooktable, if
  set, rather than ns__hook_table. (ns__hook_table is retained for
  use by unit tests.)
- update the filter-aaaa system test to load filter-aaaa.so
- add a prereq script to check for dlopen support before running
  the filter-aaaa system test

not yet done:
- configuration parameters are not being passed to the filter-aaaa
  module; the filter-aaaa ACL and filter-aaaa-on-{v4,v6} settings are
  still stored in dns_view
2018-12-06 10:29:11 -08:00
Evan Hunt
e2ac439e28 move filter-aaaa.so build from lib/ns to bin/hooks 2018-12-06 10:29:11 -08:00
Evan Hunt
d3f0f71b6b initial implementation of filter-aaaa.so as a shared object
- temporary kluge! in this version, for testing purposes,
  named always searches for a filter-aaaa module at /tmp/filter-aaaa.so.
  this enables the filter-aaaa system test to run even though the
  code to configure hooks in named.conf hasn't been written yet.
- filter-aaaa-on-v4, filter-aaaa-on-v6 and the filter-aaaa ACL are
  still configured in the view as they were before, not in the hook.
2018-12-06 10:29:10 -08:00
Evan Hunt
e4f0a98b4d move several query.c helper functions to client.c and rename
- these formerly static helper functions have been moved into client.c
  and made external so that they can be used in hook modules as well as
  internally in libns: query_newrdataset, query_putrdataset,
  query_newnamebuf, query_newname, query_getnamebuf, query_keepname,
  query_releasename, query_newdbversion, query_findversion
- made query_recurse() and query_done() into public functions
  ns_query_recurse() and ns_query_done() so they can be called from
  modules.
2018-12-06 10:29:10 -08:00
Evan Hunt
0d7ab9bafc move filter-aaaa implementation into hook functions directly 2018-12-06 10:29:10 -08:00
Evan Hunt
d43dcef139 refactor filter-aaaa implementation
- the goal of this change is for AAAA filtering to be fully contained
   in the query logic, and implemented at discrete points that can be
   replaced with hook callouts later on.
 - the new code may be slightly less efficient than the old filter-aaaa
   implementation, but maximum efficiency was never a priority for AAAA
   filtering anyway.
 - we now use the rdataset RENDERED attribute to indicate that an AAAA
   rdataset should not be included when rendering the message. (this
   flag was originally meant to indicate that an rdataset has already
   been rendered and should not be repeated, but it can also be used to
   prevent rendering in the first place.)
 - the DNS_MESSAGERENDER_FILTER_AAAA, NS_CLIENTATTR_FILTER_AAAA,
   and DNS_RDATASETGLUE_FILTERAAAA flags are all now unnecessary and
   have been removed.
2018-12-06 10:29:10 -08:00
Evan Hunt
29897b14dc refactor query.c to make qctx more accessible
- the purpose of this change is allow for more well-defined hook points
  to be available in the query processing logic. some functions that
  formerly didn't have access to 'qctx' do now; this is needed because
  'qctx' is what gets passed when calling a hook function.
- query_addrdataset() has been broken up into three separate functions
  since it used to do three unrelated things, and what was formerly
  query_addadditional() has been renamed query_additional_cb() for
  clarity.
- client->filter_aaaa is now qctx->filter_aaaa. (later, it will be moved
  into opaque storage in the qctx, for use by the filter-aaaa module.)
- cleaned up style and braces
2018-12-06 10:29:10 -08:00
Evan Hunt
70cc3f803e set up hooks.c to enable setting hook points and loading modules
- move hooks.h to public include directory
- ns_hooktable_init() initializes a hook table. if NULL is passed in, it
  initializes the global hook table
- ns_hooktable_save() saves a pointer to the current global hook table.
- ns_hooktable_reset() replaces the global hook table with different
  one
- ns_hook_add() adds hooks at specified hook points in a hook table (or
  the global hook table if the specified table is NULL)
- load and unload functions support dlopen() of hook modules (this is
  adapted from dyndb and not yet functional)
- began adding new hook points to query.c
2018-12-06 10:29:05 -08:00
Ondřej Surý
6f11f90ef4 Merge branch 'mr1106-remove-some-more-algorithm-references-master' into 'master'
(master) Mr1106 remove some more algorithm references

See merge request isc-projects/bind9!1192
2018-12-06 09:39:41 -05:00
Matthijs Mekking
0737079824 Replace some more DSA examples with ECDSAP256SHA256
(cherry picked from commit 5f27dc35df7651be8bfd24138c2ccd6fd28806af)
2018-12-06 14:47:05 +01:00
Matthijs Mekking
7ef858f503 Remove one more GOST reference
We can remove this, because it is used in `strtodsdigest` but that
already no longer covers the algorithm name "GOST".

There is one more GOST reference in `bin/python/isc/checkds.py.in`
but that is used for presentation format and probably should stay.

(cherry picked from commit 57d44fbc628d3c7dafdd545f6b83dbdcdc39a986)
2018-12-06 14:47:05 +01:00
Mark Andrews
1cf2f7d077 Merge branch '756-dyndb-system-test-failing-intermittently' into 'master'
Add additional logging to driver.

See merge request isc-projects/bind9!1178
2018-12-05 19:04:40 -05:00
Mark Andrews
6a5c8ec2ea add more error logging; add event processing logging 2018-12-05 18:23:30 -05:00
Ondřej Surý
d0ba302028 Merge branch '444-isc_refcount_decrement-uses-invalid-memory-ordering' into 'master'
Resolve "isc_refcount_decrement() uses invalid memory ordering"

Closes #444

See merge request isc-projects/bind9!560
2018-12-05 14:35:35 -05:00
Ondřej Surý
953a957dfa Just #define isc_refcount_increment0() to isc_refcount_increment() 2018-12-05 14:16:41 +01:00
Ondřej Surý
8537adef4c The isc_refcount_decrement must use memory_order_release and isc_refcount_destroy must run thread barrier with memory_order_require 2018-12-05 14:11:53 +01:00
Witold Krecicki
43be6ff428 Merge branch '744-race-in-socket' into 'master'
Fix a race between process_fd and socketclose in unix socket code. [GL #744]

Closes #744

See merge request isc-projects/bind9!1145
2018-12-05 07:19:32 -05:00
Witold Kręcicki
ddc1d4d6d4 Fix a race between process_fd and socketclose in unix socket code. [GL #744] 2018-12-05 12:03:52 +00:00
Ondřej Surý
258ea3a8f4 Merge branch '628-refactor-masterformat-system-test' into 'master'
Refactor masterformat system test

See merge request isc-projects/bind9!1180
2018-12-05 06:22:51 -05:00
Ondřej Surý
00cc0b236a Add DNSKEY and CDNSKEY with unknown algorithm number (PRIVATEDNS) and \0 as content 2018-12-05 11:29:27 +01:00
Ondřej Surý
b13c7ca402 Refactor masterformat to be shellcheck clean and don't use RSAMD5 algorithm in the tests 2018-12-05 11:29:27 +01:00
Ondřej Surý
cbcf6dacb6 Merge branch '745-start.pl-and-stop.pl-cygwin-fixes' into 'master'
Make the start.pl and stop.pl more Cygwin friendly

Closes #745

See merge request isc-projects/bind9!1175
2018-12-04 09:17:06 -05:00
Ondřej Surý
835bad2c5c Make the start.pl and stop.pl more Cygwin friendly 2018-12-04 15:02:22 +01:00
Witold Krecicki
8743a853d2 Merge branch '628-dont-check-for-memory-leaks-in-dnstest.c' into 'master'
Don't check the memory leaks in the libdns tests as they hide the cmocka assertion failures

Closes #628

See merge request isc-projects/bind9!1174
2018-12-04 04:57:38 -05:00
Ondřej Surý
ef87b1e60b Don't check the memory leaks in the libdns tests as they hide the cmocka assertion failures 2018-12-04 09:00:42 +01:00
Ondřej Surý
69dee61f5a Merge branch '745-fix-missing-realpath-on-centos6' into 'master'
Replace realpath with cd&pwd shell magic

See merge request isc-projects/bind9!1172
2018-12-03 15:16:11 -05:00
Ondřej Surý
88d3338f5f Replace realpath with cd&pwd shell magic 2018-12-03 20:40:59 +01:00
Witold Krecicki
c644c0f283 Merge branch 'wpk-test-fixes' into 'master'
Fetchlimit and tcp test fixes

See merge request isc-projects/bind9!1150
2018-12-03 14:03:23 -05:00
Witold Kręcicki
9532e3256e tcp test: sleep for 1 second before gathering stats to make
sure that the stats are there
2018-12-03 18:49:48 +00:00
Witold Kręcicki
a48ca15e77 Fetchlimit test: update softquota limit to 380.
In the test the quota is set to 400, and softquota to 90%*400=360.
We first attach to quota, and then if we're above softquota we
drop the oldest client. With new socket code and taskmgr it's
parallel enough to create a race between multiple instances doing
'attach to quota' and then 'drop oldest client' - making number
of clients go over softquota. It's not a problem in real life, as
it's just soft quota.
2018-12-03 18:49:48 +00:00
Ondřej Surý
998e3e2880 Merge branch '745-start.pl-refactoring' into 'master'
start.pl - wait for server to say 'running', refactor

Closes #745

See merge request isc-projects/bind9!1141
2018-12-03 10:58:32 -05:00
Ondřej Surý
e227815af5 Make calls to the stop.pl always use the test name instead of '.' 2018-12-03 16:24:09 +01:00
Ondřej Surý
27ee629e6b stop.pl - refactor 2018-12-03 16:24:09 +01:00
Ondřej Surý
16b95157e8 Make calls to the start.pl always use the test name instead of '.' 2018-12-03 15:50:21 +01:00
Brian Conry
0fc8bfef13 start.pl - refactor 2018-12-03 15:50:21 +01:00
Brian Conry
597049461d start.pl - wait for server to say 'running' 2018-12-03 15:23:36 +01:00
Ondřej Surý
828d7121e0 Merge branch '628-improvements-to-system-tests-windows-fixes' into 'master'
Fix typos and missing ALTERNATIVE_ALGORITHM in conf.sh.win32

See merge request isc-projects/bind9!1169
2018-12-03 08:38:41 -05:00
Ondřej Surý
253c175d7b Fix typos and missing ALTERNATIVE_ALGORITHM in conf.sh.win32 2018-12-03 09:29:33 +01:00
Ondřej Surý
f454d9825c Merge branch '628-improvements-to-system-tests' into 'master'
Tiny small improvements to system test scripts.

See merge request isc-projects/bind9!1166
2018-12-03 03:01:27 -05:00
Ondřej Surý
b2c4c35493 Add ALTERNATIVE_ALGORITHM to conf.sh 2018-12-03 08:34:49 +01:00
Ondřej Surý
1b2a3a0ea6 Export SYSTEMTESTTOP from run.sh (so, it doesn't have to be defined in each script) and scrub / from the test names 2018-12-03 08:34:45 +01:00
Mark Andrews
7c60b78080 Merge branch '754-silence-warning-about-first-half-of-conditional-always-being-true' into 'master'
Resolve "Silence warning about first half of conditional always being true."

Closes #754

See merge request isc-projects/bind9!1162
2018-12-03 00:49:39 -05:00
Mark Andrews
5744415a75 only test for prefixlen <= 63 2018-12-03 16:26:54 +11:00
Mark Andrews
409ac247f7 Merge branch 'u/fanf2/catz-logging' into 'master'
catz: improved log message when a zone is overridden

See merge request isc-projects/bind9!1157
2018-12-02 23:38:17 -05:00
Mark Andrews
e6c5ad37a4 add CHANGES note 2018-12-03 13:45:28 +11:00
Tony Finch
16eb35187a catz: improved log message when a zone is overridden
If you have a catalog zone containing 10.in-addr.arpa and an
explicitly-configured version which overrides the catz version,
`named` used to log:

catz: error "success" while trying to add zone "10.in-addr.arpa"

After this patch it logs:

catz: zone "10.in-addr.arpa" is overridden by explicitly configured zone
2018-12-02 21:32:56 -05:00
Stephen Morris
b78376ffc9 Merge branch '750-fix-fuzzing-jobs' into 'master'
set known non-zero pesudo-random number seed when compiling for fuzzing

Closes #502 and #750

See merge request isc-projects/bind9!1151
2018-11-30 07:27:23 -05:00
Ondřej Surý
d13cabd27e fixup! When compiling for fuzzing, ensure the pseudo random number seed is non-zero. 2018-11-30 11:21:55 +00:00
Stephen Morris
77032a4e29 When compiling for fuzzing, ensure the pseudo random number seed is non-zero. 2018-11-30 11:21:55 +00:00
Evan Hunt
73bc3147d1 Merge branch 'each-export-dynamic' into 'master'
set the export-dynamic linker flag on linux

See merge request isc-projects/bind9!1154
2018-11-29 02:17:32 -05:00
Evan Hunt
66fc2f7fec set the export-dynamic linker flag on linux 2018-11-29 01:50:00 -05:00
Mark Andrews
b29f0c1d05 Merge branch '748-dns_catz_-are-missing-lots-of-dbc-checks' into 'master'
Resolve "dns_catz_* are missing lots of DBC checks."

Closes #748

See merge request isc-projects/bind9!1143
2018-11-28 21:15:04 -05:00
Mark Andrews
a487473fc5 add missing DBC checks for catz and add isc_magic checks; add DBC checks to ht.c 2018-11-29 12:39:20 +11:00
Mark Andrews
b726ca4533 Merge branch '585-dnssec-coverage-fails-with-typeerror-for-ksk-with-a-deletion-date-set' into 'master'
Resolve "dnssec-coverage fails with TypeError for KSK with a Deletion date set"

Closes #585

See merge request isc-projects/bind9!1133
2018-11-28 16:36:08 -05:00
Mark Andrews
02d20a2f53 add CHANGES note 2018-11-29 07:50:02 +11:00
Mark Andrews
6499bdfd8b use documented default key ttl 2018-11-29 07:50:02 +11:00
Mark Andrews
0ac2a868bb add reproducer for [GL #585] 2018-11-29 07:50:02 +11:00
Evan Hunt
6ab40c043d Merge branch '747-build-failure' into 'master'
silence compiler warning

Closes #747

See merge request isc-projects/bind9!1148
2018-11-28 12:14:22 -05:00
Evan Hunt
b99af25d0f silence compiler warning 2018-11-28 12:00:16 -05:00
Mark Andrews
53bdf8038c Merge branch '731-catalog-zone-incorrect-logging' into 'master'
Resolve "Catalog zone incorrect logging"

Closes #731

See merge request isc-projects/bind9!1142
2018-11-28 07:31:25 -05:00
Mark Andrews
0708e43d3f update zname with the current zone anme 2018-11-28 15:59:30 +11:00
Michał Kępień
e8d7292d5d Merge branch '730-fix-build-time-python-configuration' into 'master'
Fix build-time Python configuration

Closes #730

See merge request isc-projects/bind9!1128
2018-11-27 10:25:21 -05:00
Michał Kępień
b94293f591 Add CHANGES entry
5101.	[bug]		Fix default installation path for Python modules and
			remove the dnspython dependency accidentally introduced
			by change 4970. [GL #730]
2018-11-27 14:09:37 +01:00
Ondřej Surý
d75602406e Fix build-time Python configuration
Apply various fixes and tweaks to Python configuration logic implemented
in the "configure" script:

  - Prevent PYTHON_INSTALL_DIR, which holds the value passed to the
    --with-python-install-dir option, from being set to "unspec" by
    default as this breaks installing Python modules when the
    --with-python-install-dir option is not used.

  - Make the --with-python-install-dir option also work when the Python
    interpreter is specified explicitly (using --with-python=<...>).

  - Remove dnspython dependency which was erroneously introduced in
    commit 31b0dc1f20: no installed Python
    module depends on dnspython, it is only used in system tests, for
    which dedicated scripts exist that check whether dnspython is
    available and act accordingly.

  - Improve contents and placement of error messages.

  - Reduce duplication of code checking Python dependencies.

  - Use Autoconf macros AS_CASE() and AS_IF() instead of plain shell
    code.

  - Update comments.  Capitalize the word "Python" when referring to the
    language itself rather than a specific executable.
2018-11-27 14:09:34 +01:00
Ondřej Surý
2ecd280297 Merge branch 'ondrej-add-python-3.6-and-3.7-to-configure.ac' into 'master'
Add python3.6 and python3.7 to the search list of python versions

See merge request isc-projects/bind9!1136
2018-11-27 04:32:20 -05:00
Ondřej Surý
da9038e9a0 Add python3.6 and python3.7 to the search list of python versions 2018-11-27 09:21:12 +01:00
Ondřej Surý
c5b8bc0e15 Merge branch '620-fix-cmocka-includes' into 'master'
Move the CMocka include directories from CFLAGS to CINCLUDES where it belongs to…

See merge request isc-projects/bind9!1135
2018-11-26 10:41:02 -05:00
Ondřej Surý
a688a43faf Move the CMocka include directories from CFLAGS to CINCLUDES where it belongs to not get overriden later by the default CFLAGS rule 2018-11-26 16:16:34 +01:00
Michał Kępień
bf519a3574 Merge branch '732-fix-compilation-on-centos-6-i386' into 'master'
Fix compilation on CentOS 6 (i386)

Closes #732

See merge request isc-projects/bind9!1129
2018-11-26 05:22:36 -05:00
Michał Kępień
62ca7743ae Fix compilation on CentOS 6 (i386)
The stock toolchain available on CentOS 6 for i386 is unable to use the
_mm_pause() intrinsic.  Fix by using "rep; nop" assembly instructions on
that platform instead.
2018-11-26 10:57:14 +01:00
Ondřej Surý
7e4ed9f8ad Merge branch '674-fix-windows-build' into 'master'
Fix typo __LINE -> __LINE__ in lib/isc/win32/condition.c

See merge request isc-projects/bind9!1132
2018-11-23 18:54:26 -05:00
Ondřej Surý
e24afa3088 Fix typo __LINE -> __LINE__ 2018-11-24 00:53:24 +01:00
Witold Krecicki
ad0b4e9d41 Merge branch 'wpk-fix-recursive-performance' into 'master'
Bound tasks for resolver; Task quantum tweaks.

See merge request isc-projects/bind9!1117
2018-11-23 04:59:23 -05:00
Witold Kręcicki
d5793ecca2 - isc_task_create_bound - create a task bound to specific task queue
If we know that we'll have a task pool doing specific thing it's better
  to use this knowledge and bind tasks to task queues, this behaves better
  than randomly choosing the task queue.

- use bound resolver tasks - we have a pool of tasks doing resolutions,
  we can spread the load evenly using isc_task_create_bound

- quantum set universally to 25
2018-11-23 04:34:02 -05:00
Ondřej Surý
54b4e4e61c Merge branch 'ondrej-shorten-job-names' into 'master'
Change the job names, so they are more useful in pipeline overview

See merge request isc-projects/bind9!1127
2018-11-23 04:08:08 -05:00
Ondřej Surý
6363652d51 Change the job names, so they are more useful in pipeline overview 2018-11-23 08:45:50 +01:00
Mark Andrews
4f075d869c Merge branch '729-init_hasreuseport-will-not-work-on-systems-w-o-ipv4' into 'master'
Resolve "init_hasreuseport will not work on systems w/o IPv4"

Closes #729

See merge request isc-projects/bind9!1126
2018-11-22 23:31:34 -05:00
Mark Andrews
509dad8737 handle systems without IPv4 2018-11-23 12:05:53 +11:00
Mark Andrews
1634592c99 Merge branch '705-negative-value-passed-to-close-on-socket-c-and-resource-leak' into 'master'
Resolve "negative value passed to close on socket.c and resource leak"

Closes #705

See merge request isc-projects/bind9!1095
2018-11-22 20:00:30 -05:00
Mark Andrews
6696a40ea9 address resource leak; don't call close() on socket error; 2018-11-23 10:34:59 +11:00
Mark Andrews
2eabc74547 Merge branch '715-side-effect-in-assertion-in-name_test-c' into 'master'
Resolve "side effect in assertion in name_test.c"

Closes #715

See merge request isc-projects/bind9!1102
2018-11-22 18:19:01 -05:00
Mark Andrews
2156a5b610 address coverity side effect in assert warning 2018-11-22 17:57:54 -05:00
Mark Andrews
e9d999f6b0 Merge branch '717-bin-named-server-c-load_zones-can-leak-memory' into 'master'
Resolve "bin/named/server.c:load_zones can leak memory"

Closes #717

See merge request isc-projects/bind9!1104
2018-11-22 17:57:18 -05:00
Mark Andrews
33132406a3 decrement zl->refs on error 2018-11-22 17:22:42 -05:00
Mark Andrews
9cf529fa50 Merge branch '716-remove-logically-dead-code-try-2' into 'master'
Resolve "remove logically dead code try #2"

Closes #716

See merge request isc-projects/bind9!1103
2018-11-22 17:17:43 -05:00
Mark Andrews
29fb4faf76 remove dead code 2018-11-22 17:04:00 -05:00
Ondřej Surý
d0f0298f38 Merge branch '706-remove-isc_mem_set_get_quota' into 'master'
Resolve "Unchecked isc_mem_get's in dnssec-signzone.c and socket.c"

Closes #706

See merge request isc-projects/bind9!1093
2018-11-22 11:03:37 -05:00
Ondřej Surý
d1a8a3faed Memory allocations must be fatal even when default_memalloc is not used 2018-11-22 16:46:57 +01:00
Ondřej Surý
2fa857d502 Cleanup lib/isc/mem.c after failed allocations made fatal 2018-11-22 16:46:56 +01:00
Ondřej Surý
3987a146be Remove isc_mem_{set,get}quota unused functions 2018-11-22 16:46:56 +01:00
Ondřej Surý
0667fa935a Merge branch '726-fix-NetBSD-build' into 'master'
Fix the build on NetBSD due to the differences in pthread implementation.

Closes #726

See merge request isc-projects/bind9!1123
2018-11-22 09:43:56 -05:00
Håvard Eidnes
f6c4ed94e4 Fix the build on NetBSD due to the differences in pthread implementation.
Signed-off-by: Ondřej Surý <ondrej@sury.org>
2018-11-22 09:43:43 -05:00
Ondřej Surý
259a4947e6 Merge branch '670-add-coccinelle-unreachable-spatch' into 'master'
Add first coccinelle based precheck test to the GitLab CI

See merge request isc-projects/bind9!1042
2018-11-22 09:28:15 -05:00
Ondřej Surý
2271e77d99 Add couple more ISC_UNREACHABLE(); found thanks to coccinelle 2018-11-22 09:28:00 -05:00
Ondřej Surý
21db43da8e Add unreachable.spatch coccinelle recipe and run it in precheck CI phase 2018-11-22 09:28:00 -05:00
Witold Krecicki
e3c8a23276 Merge branch 'wpk-crash-on-mutex-init-failure' into 'master'
isc_mutex_init and isc_condition_init failures are now fatal

See merge request isc-projects/bind9!1049
2018-11-22 07:13:54 -05:00
Witold Kręcicki
929ea7c2c4 - Make isc_mutex_destroy return void
- Make isc_mutexblock_init/destroy return void
- Minor cleanups
2018-11-22 11:52:08 +00:00
Ondřej Surý
d940e95206 isc_quota_init now returns 'void' 2018-11-22 11:52:08 +00:00
Ondřej Surý
b7a15a5da0 Add CHANGES entry for GL #674 2018-11-22 11:52:08 +00:00
Ondřej Surý
2f3eee5a4f isc_mutex_init returns 'void' 2018-11-22 11:51:49 +00:00
Ondřej Surý
73a8999d1c isc_condition_init returns 'void' 2018-11-22 11:51:49 +00:00
Witold Kręcicki
0bed9bfc28 isc_mutex_init and isc_condition_init failures are now fatal 2018-11-22 11:51:49 +00:00
1726 changed files with 47468 additions and 44205 deletions

88
.dir-locals.el Normal file
View File

@@ -0,0 +1,88 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((c-mode .
((eval .
(set (make-local-variable 'directory-of-current-dir-locals-file)
(file-name-directory (locate-dominating-file default-directory ".dir-locals.el"))
)
)
(eval .
(set (make-local-variable 'include-directories)
(list
;; top directory
(expand-file-name
(concat directory-of-current-dir-locals-file "./"))
;; current directory
(expand-file-name (concat default-directory "./"))
;; libisc
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/include"))
;; libdns
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/dns/include"))
;; libisccc
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isccc/include"))
;; libisccfg
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isccfg/include"))
;; libns
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/ns/include"))
;; libirs
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/irs/include"))
;; libbind9
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
(expand-file-name "/usr/local/opt/openssl@1.1/include")
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
(expand-file-name "/usr/local/opt/json-c/include/json-c/")
(expand-file-name "/usr/local/include")
)
)
)
(eval setq flycheck-clang-include-path include-directories)
(eval setq flycheck-cppcheck-include-path include-directories)
(eval setq flycheck-gcc-include-path include-directories)
(eval setq flycheck-clang-args
(list
"-include"
(expand-file-name
(concat directory-of-current-dir-locals-file "config.h"))
)
)
(eval setq flycheck-gcc-args
(list
"-include"
(expand-file-name
(concat directory-of-current-dir-locals-file "config.h"))
)
)
(eval setq flycheck-cppcheck-args
(list
"--enable=all"
"--suppress=missingIncludeSystem"
(concat "-include=" (expand-file-name
(concat directory-of-current-dir-locals-file "config.h")))
)
)
)
))

3
.gitattributes vendored
View File

@@ -1,3 +1,2 @@
*.sln.in eol=crlf
*.vcxproj.in eol=crlf
*.vcxproj.filters.in eol=crlf
*.vcxproj.* eol=crlf

80
.gitignore vendored
View File

@@ -1,36 +1,58 @@
Makefile
config.log
config.h
config.cache
config.status
libtool
/isc-config.sh
/configure.lineno
autom4te.cache/
*.rej
*.orig
*.o
*.lo
*.so
*.a
*.la
*.gcno
*.gcda
*_test
*-symtbl.c
timestamp
ans.run
named.run
named.memstats
gen.dSYM/
*.a
*.gcda
*.gcno
*.la
*.lo
*.o
*.orig
*.plist/ # ccc-analyzer store its results in .plist directories
*.rej
*.so
*_test
*~
.ccache/
.cproject
.deps/
.dirstamp
.libs/
# ccc-analyzer store its results in .plist directories
*.plist/
*~
.project
.cproject
.settings
kyua.log
/aclocal.m4
/ar-lib
/autom4te.cache/
/bind.keys.h
/compile
/config.cache
/config.guess
/config.h
/config.h.in
/config.log
/config.status
/config.sub
/configure
/configure.lineno
/depcomp
/install-sh
/isc-config.sh
/libltdl/*
/libtool
/ltmain.sh
/m4/libtool.m4
/m4/ltargz.m4
/m4/ltdl.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/missing
/py-compile
/stamp-h1
/test-driver
Makefile
ans.run
gen.dSYM/
kyua.log
named.memstats
named.run
timestamp

View File

@@ -1,172 +1,225 @@
variables:
# Not normally needed, but may be if some script uses `apt-get install`.
DEBIAN_FRONTEND: noninteractive
# Locale settings do not affect the build, but might affect tests.
LC_ALL: C
DOCKER_DRIVER: overlay2
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
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
.linux-amd64: &linux_amd64
tags:
- linux
- amd64
.linux-i386: &linux_i386
tags:
- linux
- i386
### 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
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
tags:
- linux
- docker
- amd64
<<: *linux_amd64
.centos-centos7-amd64: &centos_centos7_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
tags:
- linux
- docker
- amd64
<<: *linux_amd64
# Debian
.debian-jessie-amd64: &debian_jessie_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
tags:
- linux
- docker
- amd64
.debian-jessie-i386: &debian_jessie_i386_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
tags:
- linux
- docker
- i386
<<: *linux_amd64
.debian-stretch-amd64: &debian_stretch_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
tags:
- linux
- docker
- amd64
<<: *linux_amd64
.debian-stretch-i386:: &debian_stretch_i386_image
.debian-stretch-i386: &debian_stretch_i386_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
tags:
- linux
- docker
- i386
<<: *linux_i386
.debian-buster-amd64: &debian_buster_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
tags:
- linux
- docker
- amd64
.debian-buster-i386:: &debian_buster_i386_image
image: "$CI_REGISTRY_IMAGE:debian-buster-i386"
tags:
- linux
- docker
- i386
<<: *linux_i386
.debian-sid-amd64: &debian_sid_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
tags:
- linux
- docker
- amd64
<<: *linux_amd64
.debian-sid-i386: &debian_sid_i386_image
image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
tags:
- linux
- docker
- i386
<<: *linux_i386
.ubuntu-trusty-amd64: &ubuntu_trusty_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-amd64"
tags:
- linux
- docker
- amd64
# Fedora
.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
tags:
- linux
- docker
- i386
.fedora-30-amd64: &fedora_30_amd64_image
image: "$CI_REGISTRY_IMAGE:fedora-30-amd64"
<<: *linux_amd64
# Ubuntu
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
tags:
- linux
- docker
- amd64
<<: *linux_amd64
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
tags:
- linux
- docker
- i386
<<: *linux_i386
.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64"
<<: *linux_amd64
.ubuntu-bionic-i386: &ubuntu_bionic_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386"
<<: *linux_i386
### Job Templates
.default-triggering-rules: &default_triggering_rules
only:
- merge_requests
- tags
- web
.precheck: &precheck_job
<<: *default_triggering_rules
<<: *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}"
# - ./autogen.sh
script:
- ./configure --enable-developer --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
- *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:
paths:
- doc/
expire_in: '1 hour'
untracked: true
expire_in: "1 hour"
.install_test: &install_test_job
stage: test
before_script:
- mkdir $HOME/.local
script:
- make install
.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
stage: test
<<: *default_triggering_rules
stage: system
retry: 2
before_script:
- rm -rf .ccache
- 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
artifacts:
untracked: true
expire_in: '1 week'
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
stage: test
<<: *default_triggering_rules
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
- kyua.results
- kyua_html/
expire_in: '1 week'
- kyua.log
- kyua.results
- kyua_html/
expire_in: "1 week"
when: on_failure
precheck:debian:sid:amd64:
<<: *debian_sid_amd64_image
stage: precheck
### Job Definitions
# Jobs in the precheck stage
autoreconf:sid:amd64:
<<: *autoconf_job
misc:sid:amd64:
<<: *precheck_job
script:
- sh util/check-ans-prereq.sh
- sh util/checklibs.sh > checklibs.out
- sh util/tabify-changes < CHANGES > CHANGES.tmp
- diff -urNap CHANGES CHANGES.tmp
- rm CHANGES.tmp
- perl util/check-changes CHANGES
- perl -w util/merge_copyrights
- diff -urNap util/copyrights util/newcopyrights
@@ -175,27 +228,45 @@ precheck:debian:sid:amd64:
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
- xmllint --noout --nonet --html `git ls-files '*.html'`
- sh util/check-win32util-configure
artifacts:
paths:
- util/newcopyrights
- checklibs.out
expire_in: '1 week'
- util/newcopyrights
- checklibs.out
expire_in: "1 week"
when: on_failure
docs:debian:sid:amd64:
<<: *debian_sid_amd64_image
stage: test
dependencies:
- build:debian:sid:amd64
🐞:sid:amd64:
<<: *precheck_job
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: 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/
expire_in: '1 month'
- doc/arm/
expire_in: "1 month"
only:
- merge_requests
- tags
- web
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
push:docs:
push:docs:sid:amd64:
<<: *debian_sid_amd64_image
stage: push
dependencies: []
@@ -203,33 +274,35 @@ push:docs:
- curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
only:
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
#build:debian:jessie:amd64:
# <<: *debian_jessie_amd64_image
# <<: *build_job
#
#build:debian:jessie:i386:
# <<: *debian_jessie_i386_image
# <<: *build_job
#
#build:debian:stretch:amd64:
# <<: *debian_stretch_amd64_image
# <<: *build_job
#
#build:debian:buster:i386:
# <<: *debian_buster_i386_image
# <<: *build_job
#
#build:ubuntu:trusty:amd64:
# <<: *ubuntu_trusty_amd64_image
# <<: *build_job
#
#build:ubuntu:xenial:i386:
# <<: *ubuntu_xenial_i386_image
# <<: *build_job
# Jobs for regular GCC builds on Alpine Linux 3.10 (amd64)
build:centos:centos6: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:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
@@ -237,45 +310,238 @@ build:centos:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *build_job
build:centos:centos7:amd64:
system:gcc:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *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)
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
build:clang:debian:stretch:amd64:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_stretch_amd64_image
<<: *build_job
system:gcc:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *system_test_job
dependencies:
- gcc:centos7:amd64
needs: ["gcc:centos7:amd64"]
build:debian:jessie: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)
gcc:jessie:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: --without-cmocka
EXTRA_CONFIGURE: "--without-cmocka --with-python --disable-geoip"
<<: *debian_jessie_amd64_image
<<: *build_job
build:debian:stretch:amd64:
system:gcc:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *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)
gcc:stretch:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_stretch_amd64_image
<<: *build_job
build:debian:sid:amd64:
system:gcc:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *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 -O3 -g"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2"
RUN_MAKE_INSTALL: 1
<<: *debian_sid_amd64_image
<<: *build_job
system:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *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 -O3 -g"
EXTRA_CONFIGURE: "--enable-dnstap --with-libidn2 --without-python"
<<: *debian_sid_i386_image
<<: *build_job
system:gcc:sid:i386:
<<: *debian_sid_i386_image
<<: *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 30 (amd64)
gcc:fedora30:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image
<<: *fedora_30_amd64_image
<<: *build_job
build:asan:debian:sid:amd64:
system:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
<<: *system_test_job
dependencies:
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
unit:gcc:fedora30:amd64:
<<: *fedora_30_amd64_image
<<: *unit_test_job
dependencies:
- gcc:fedora30:amd64
needs: ["gcc:fedora30:amd64"]
# Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
gcc:xenial:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--disable-geoip"
<<: *ubuntu_xenial_amd64_image
<<: *build_job
system:gcc:xenial:amd64:
<<: *ubuntu_xenial_amd64_image
<<: *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)
gcc:bionic:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *ubuntu_bionic_amd64_image
<<: *build_job
system:gcc:bionic:amd64:
<<: *ubuntu_bionic_amd64_image
<<: *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)
asan:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
@@ -284,118 +550,96 @@ build:asan:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *build_job
build:clang:debian:stretch:i386:
system:asan:sid:amd64:
<<: *debian_sid_amd64_image
<<: *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)
clang:stretch:amd64:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
EXTRA_CONFIGURE: "--with-python=python3"
<<: *debian_stretch_amd64_image
<<: *build_job
unit:clang:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- clang:stretch:amd64
needs: ["clang:stretch:amd64"]
# Jobs for Clang builds on Debian Stretch (i386)
clang:stretch:i386:
variables:
CC: clang
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
EXTRA_CONFIGURE: "--with-python=python2"
<<: *debian_stretch_i386_image
<<: *build_job
build:debian:sid:i386:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_i386_image
<<: *build_job
# Jobs for PKCS#11-enabled GCC builds on Debian Sid (amd64)
unittest:centos:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *unit_test_job
dependencies:
- build:centos:centos6:amd64
unittest:centos:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *unit_test_job
dependencies:
- build:centos:centos7:amd64
unittest:debian:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *unit_test_job
dependencies:
- build:debian:jessie:amd64
unittest:debian:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- build:debian:stretch:amd64
unittest:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- build:debian:sid:amd64
unittest:asan:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- build:asan:debian:sid:amd64
unittest:clang:debian:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- build:clang:debian:stretch:amd64
unittest:debian:sid:i386:
<<: *debian_sid_i386_image
<<: *unit_test_job
dependencies:
- build:debian:sid:i386
systemtest:centos:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *system_test_job
dependencies:
- build:centos:centos6:amd64
systemtest:centos:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *system_test_job
dependencies:
- build:centos:centos7:amd64
systemtest:debian:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *system_test_job
dependencies:
- build:debian:jessie:amd64
systemtest:debian:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *system_test_job
dependencies:
- build:debian:stretch:amd64
systemtest:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- build:debian:sid:amd64
systemtest:asan:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- build:asan:debian:sid:amd64
systemtest:debian:sid:i386:
<<: *debian_sid_i386_image
<<: *system_test_job
dependencies:
- build:debian:sid:i386
install:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *install_test_job
dependencies:
- build:debian:sid:amd64
pkcs11:build:debian:sid:amd64:
pkcs11:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
@@ -403,34 +647,40 @@ pkcs11:build:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *build_job
pkcs11:unittest:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- pkcs11:build:debian:sid:amd64
pkcs11:systemtest:debian:sid:amd64:
system:pkcs11:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- pkcs11:build:debian:sid:amd64
- pkcs11:sid:amd64
needs: ["pkcs11:sid:amd64"]
noassert:build:debian: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 -O2 -g -DISC_CHECK_NONE=1"
EXTRA_CONFIGURE: "--with-libidn2"
CFLAGS: "-Wall -Wextra -Og -g"
EXTRA_CONFIGURE: "--with-libidn2 --without-libtool --with-dlopen"
<<: *debian_sid_amd64_image
<<: *build_job
noassert:unittest:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- noassert:build:debian:sid:amd64
noassert:systemtest:debian:sid:amd64:
system:nolibtool:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- noassert:build:debian:sid:amd64
- 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"]

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).

646
CHANGES
View File

@@ -1,3 +1,639 @@
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]
--- 9.15.0 released ---
5233. [bug] Negative trust anchors did not work with "forward only;"
to validating resolvers. [GL #997]
5232. [placeholder]
5231. [protocol] Add support for displaying CLIENT-TAG and SERVER-TAG.
[GL #960]
5230. [protocol] The SHA-1 hash algorithm is no longer used when
generating DS and CDS records. [GL #1015]
5229. [protocol] Enforce known SSHFP fingerprint lengths. [GL #852]
5228. [func] If trusted-keys and managed-keys were configured
simultaneously for the same name, the key could
not be be rolled automatically. This is now
a fatal configuration error. [GL #868]
5227. [placeholder]
5226. [placeholder]
5225. [func] Allow dig to print out AAAA record fully expanded.
with +[no]expandaaaa. [GL #765]
5224. [bug] Only test provide-ixfr on TCP streams. [GL #991]
5223. [bug] Fixed a race in the filter-aaaa plugin accessing
the hash table. [GL #1005]
5222. [bug] 'delv -t ANY' could leak memory. [GL #983]
5221. [test] Enable parallel execution of system tests on
Windows. [GL !4101]
5220. [cleanup] Refactor the isc_stat structure to take advantage
of stdatomic. [GL !1493]
5219. [bug] Fixed a race in the filter-aaaa plugin that could
trigger a crash when returning an instance object
to the memory pool. [GL #982]
5218. [bug] Conditionally include <dlfcn.h>. [GL #995]
5217. [bug] Restore key id calculation for RSAMD5. [GL #996]
5216. [bug] Fetches-per-zone counter wasn't updated correctly
when doing qname minimization. [GL #992]
5215. [bug] Change #5124 was incomplete; named could still
return FORMERR instead of SERVFAIL in some cases.
[GL #990]
5214. [bug] win32: named now removes its lock file upon shutdown.
[GL #979]
5213. [bug] win32: Eliminated a race which allowed named.exe running
as a service to be killed prematurely during shutdown.
[GL #978]
5212. [placeholder]
5211. [bug] Allow out-of-zone additional data to be included
in authoritative responses if recursion is allowed
and "minimal-responses" is disabled. This behavior
was inadvertently removed in change #4605. [GL #817]
5210. [bug] When dnstap is enabled and recursion is not
available, incoming queries are now logged
as "auth". Previously, this depended on whether
recursion was requested by the client, not on
whether recursion was available. [GL #963]
5209. [bug] When update-check-ksk is true, add_sigs was not
considering offline keys, leaving record sets signed
with the incorrect type key. [GL #763]
5208. [test] Run valid rdata wire encodings through totext+fromtext
and tofmttext+fromtext methods to check these methods.
[GL #899]
5207. [test] Check delv and dig TTL values. [GL #965]
5206. [bug] Delv could print out bad TTLs. [GL #965]
5205. [bug] Enforce that a DS hash exists. [GL #899]
5204. [test] Check that dns_rdata_fromtext() produces a record that
will be accepted by dns_rdata_fromwire(). [GL #852]
5203. [bug] Enforce whether key rdata exists or not in KEY,
DNSKEY, CDNSKEY and RKEY. [GL #899]
5202. [bug] <dns/ecs.h> was missing ISC_LANG_ENDDECLS. [GL #976]
5201. [bug] Fix a possible deadlock in RPZ update code. [GL #973]
5200. [security] tcp-clients settings could be exceeded in some cases,
which could lead to exhaustion of file descriptors.
(CVE-2018-5743) [GL #615]
5199. [security] In certain configurations, named could crash
if nxdomain-redirect was in use and a redirected
query resulted in an NXDOMAIN from the cache.
(CVE-2019-6467) [GL #880]
5198. [bug] If a fetch context was being shut down and, at the same
time, we returned from qname minimization, an INSIST
could be hit. [GL #966]
5197. [bug] dig could die in best effort mode on multiple SIG(0)
records. Similarly on multiple OPT and multiple TSIG
records. [GL #920]
5196. [bug] make install failed with --with-dlopen=no. [GL #955]
5195. [bug] "allow-update" and "allow-update-forwarding" were
treated as configuration errors if used at the
options or view level. [GL #913]
5194. [bug] Enforce non empty ZOMEMD hash. [GL #899]
5193. [bug] EID and NIMLOC failed to do multi-line output
correctly. [GL #899]
5192. [placeholder]
5191. [placeholder]
5190. [bug] Ignore trust anchors using disabled algorithms.
[GL #806]
5189. [cleanup] Remove revoked root DNSKEY from bind.keys. [GL #945]
5188. [func] The "dnssec-enable" option is deprecated and no
longer has any effect; DNSSEC responses are
always enabled. [GL #866]
5187. [test] Set time zone before running any tests in dnstap_test.
[GL #940]
5186. [cleanup] More dnssec-keygen manual tidying. [GL !1678]
5185. [placeholder]
5184. [bug] Missing unlocks in sdlz.c. [GL #936]
5183. [bug] Reinitialize ECS data before reusing client
structures. [GL #881]
5182. [bug] Fix a high-load race/crash in handling of
isc_socket_close() in resolver. [GL #834]
5181. [func] Add a mechanism for a DLZ module to signal that
the view's allow-transfer ACL should be used to
determine whether transfers are allowed. [GL #803]
5180. [bug] delv now honors the operating system's preferred
ephemeral port range. [GL #925]
5179. [cleanup] Replace some vague type declarations with the more
specific dns_secalg_t and dns_dsdigest_t.
Thanks to Tony Finch. [GL !1498]
5178. [bug] Handle EDQUOT (disk quota) and ENOSPC (disk full)
errors when writing files. [GL #902]
5177. [func] Add the ability to specify in named.conf whether a
response-policy zone's SOA record should be added
to the additional section (add-soa yes/no). [GL #865]
5176. [tests] Remove a dependency on libxml in statschannel system
test. [GL #926]
5175. [bug] Fixed a problem with file input in dnssec-keymgr,
dnssec-coverage and dnssec-checkds when using
python3. [GL #882]
5174. [doc] Tidy dnssec-keygen manual. [GL !1557]
5173. [bug] Fixed a race in socket code that could occur when
accept, send, or recv were called from an event
loop but the socket had been closed by another
thread. [RT #874]
5172. [bug] nsupdate now honors the operating system's preferred
ephemeral port range. [GL #905]
5171. [func] named plugins are now installed into a separate
directory. Supplying a filename (a string without path
separators) in a "plugin" configuration stanza now
causes named to look for that plugin in that directory.
[GL #878]
5170. [test] Added --with-dlz-filesystem to feature-test. [GL !1587]
5169. [bug] The presence of certain types in an otherwise
empty node could cause a crash while processing a
type ANY query. [GL #901]
5168. [bug] Do not crash on shutdown when RPZ fails to load. Also,
keep previous version of the database if RPZ fails to
load. [GL #813]
5167. [bug] nxdomain-redirect could sometimes lookup the wrong
redirect name. [GL #892]
5166. [placeholder]
5165. [contrib] Removed SDB drivers from contrib; they're obsolete.
[GL #428]
5164. [bug] Correct errno to result translation in dlz filesystem
modules. [GL #884]
5163. [cleanup] Out-of-tree builds failed --enable-dnstap. [GL #836]
5162. [cleanup] Improve dnssec-keymgr manual. Thanks to Tony Finch.
[GL !1518]
5161. [bug] Do not require the SEP bit to be set for mirror zone
trust anchors. [GL #873]
5160. [contrib] Added DNAME support to the DLZ LDAP schema. Also
fixed a compilation bug affecting several DLZ
modules. [GL #872]
5159. [bug] dnssec-coverage was incorrectly ignoring
names specified on the command line without
trailing dots. [GL !1478]
5158. [protocol] Add support for AMTRELAY and ZONEMD. [GL #867]
5157. [bug] Nslookup now errors out if there are extra command
line arguments. [GL #207]
5156. [doc] Extended and refined the section of the ARM describing
mirror zones. [GL #774]
5155. [func] "named -V" now outputs the default paths to
named.conf, rndc.conf, bind.keys, and other
files used or created by named and other tools, so
that the correct paths to these files can quickly be
determined regardless of the configure settings
used when BIND was built. [GL #859]
5154. [bug] dig: process_opt could be called twice on the same
message leading to a assertion failure. [GL #860]
5153. [func] Zone transfer statistics (size, number of records, and
number of messages) are now logged for outgoing
transfers as well as incoming ones. [GL #513]
5152. [func] Improved logging of DNSSEC key events:
- Zone signing and DNSKEY maintenance events are
now logged to the "dnssec" category
- Messages are now logged when DNSSEC keys are
published, activated, inactivated, deleted,
or revoked.
[GL #714]
5151. [func] Options that have been been marked as obsolete in
named.conf for a very long time are now fatal
configuration errors. [GL #358]
5150. [cleanup] Remove the ability to compile BIND with assertions
disabled. [GL #735]
5149. [func] "rndc dumpdb" now prints a line above a stale RRset
indicating how long the data will be retained in the
cache for emergency use. [GL #101]
5148. [bug] named did not sign the TKEY response. [GL #821]
5147. [bug] dnssec-keymgr: Add a five-minute margin to better
handle key events close to 'now'. [GL #848]
5146. [placeholder]
5145. [func] Use atomics instead of locked variables for isc_quota
and isc_counter. [GL !1389]
5144. [bug] dig now returns a non-zero exit code when a TCP
connection is prematurely closed by a peer more than
once for the same lookup. [GL #820]
5143. [bug] dnssec-keymgr and dnssec-coverage failed to find
key files for zone names ending in ".". [GL #560]
5142. [cleanup] Removed "configure --disable-rpz-nsip" and
"--disable-rpz-nsdname" options. "nsip-enable"
and "nsdname-enable" both now default to yes,
regardless of compile-time settings. [GL #824]
5141. [security] Zone transfer controls for writable DLZ zones were
not effective as the allowzonexfr method was not being
called for such zones. (CVE-2019-6465) [GL #790]
5140. [bug] Don't immediately mark existing keys as inactive and
deleted when running dnssec-keymgr for the first
time. [GL #117]
5139. [bug] If possible, don't use forwarders when priming.
This ensures we can get root server IP addresses
from priming query response glue, which may not
be present if the forwarding server is returning
minimal responses. [GL #752]
5138. [bug] Under some circumstances named could hit an assertion
failure when doing qname minimization when using
forwarders. [GL #797]
5137. [func] named now logs messages whenever a mirror zone becomes
usable or unusable for resolution purposes. [GL #818]
5136. [cleanup] Check in named-checkconf that allow-update and
allow-update-forwarding are not set at the
view/options level; fix documentation. [GL #512]
5135. [port] sparc: Use smt_pause() instead of pause. [GL #816]
5134. [bug] win32: WSAStartup was not called before getservbyname
was called. [GL #590]
5133. [bug] 'rndc managed-keys' didn't handle class and view
correctly and failed to add new lines between each
view. [GL !1327]
5132. [bug] Fix race condition in cleanup part of dns_dt_create().
[GL !1323]
5131. [cleanup] Address Coverity warnings. [GL #801]
5130. [cleanup] Remove support for l10n message catalogs. [GL #709]
5129. [contrib] sdlz_helper.c:build_querylist was not properly
splitting the query string. [GL #798]
5128. [bug] Refreshkeytime was not being updated for managed
keys zones. [GL #784]
5127. [bug] rcode.c:maybe_numeric failed to handle NUL in text
regions. [GL #807]
5126. [bug] Named incorrectly accepted empty base64 and hex encoded
fields when reading master files. [GL #807]
5125. [bug] Allow for up to 100 records or 64k of data when caching
a negative response. [GL #804]
5124. [bug] Named could incorrectly return FORMERR rather than
SERVFAIL. [GL #804]
5123. [bug] dig could hang indefinitely after encountering an error
before creating a TCP socket. [GL #692]
5122. [bug] In a "forward first;" configuration, a forwarder
timeout did not prevent that forwarder from being
queried again after falling back to full recursive
resolution. [GL #315]
5121. [contrib] dlz_stub_driver.c fails to return ISC_R_NOTFOUND on none
matching zone names. [GL !1299]
5120. [placeholder]
5119. [placeholder]
5118. [security] Named could crash if it is managing a key with
`managed-keys` and the authoritative zone is rolling
the key to an unsupported algorithm. (CVE-2018-5745)
[GL #780]
5117. [placeholder]
5116. [bug] Named/named-checkconf triggered a assertion when
a mirror zone's name is bad. [GL #778]
5115. [bug] Allow unsupported algorithms in zone when not used for
signing with dnssec-signzone. [GL #783]
5114. [func] Include a 'reconfig/reload in progress' status line
in rndc status, use it in tests.
5113. [port] Fixed a Windows build error.
5112. [bug] Named/named-checkconf could dump core if there was
a missing masters clause and a bad notify clause.
[GL #779]
5111. [bug] Occluded DNSKEY records could make it into the
delegating NSEC/NSEC3 bitmap. [GL #742]
5110. [security] Named leaked memory if there were multiple Key Tag
EDNS options present. (CVE-2018-5744) [GL #772]
5109. [cleanup] Remove support for RSAMD5 algorithm. [GL #628]
--- 9.13.5 released ---
5108. [bug] Named could fail to determine bottom of zone when
removing out of date keys leading to invalid NSEC
and NSEC3 records being added to the zone. [GL #771]
5107. [bug] 'host -U' did not work. [GL #769]
5106. [experimental] A new "plugin" mechanism has been added to allow
extension of query processing functionality through
the use of dynamically loadable libraries. A
"filter-aaaa.so" plugin has been implemented,
replacing the filter-aaaa feature that was formerly
implemented as a native part of BIND.
The "filter-aaaa", "filter-aaaa-on-v4" and
"filter-aaaa-on-v6" options can no longer be
configured using native named.conf syntax. However,
loading the filter-aaaa.so plugin and setting its
parameters provides identical functionality.
Note that the plugin API is a work in progress and
is likely to evolve as further plugins are
implemented. [GL #15]
5105. [bug] Fix a race between process_fd and socketclose in
unix socket code. [GL #744]
5104. [cleanup] Log clearer informational message when a catz zone
is overridden by a zone in named.conf.
Thanks to Tony Finch. [GL !1157]
5103. [bug] Add missing design by contract tests to dns_catz*.
[GL #748]
5102. [bug] dnssec-coverage failed to use the default TTL when
checking KSK deletion times leading to a exception.
[GL #585]
5101. [bug] Fix default installation path for Python modules and
remove the dnspython dependency accidentally introduced
by change 4970. [GL #730]
5100. [func] Pin resolver tasks to specific task queues. [GL !1117]
5099. [func] Failed mutex and conditional creations are always
fatal. [GL #674]
--- 9.13.4 released ---
5098. [func] Failed memory allocations are now fatal. [GL #674]
@@ -26,8 +662,8 @@
5091. [func] Two new global and per-view options min-cache-ttl
and min-ncache-ttl [GL #613]
5090. [bug] dig and mdig failed to properly preparse dash value
pairs when value was a seperate argument and started
5090. [bug] dig and mdig failed to properly pre-parse dash value
pairs when value was a separate argument and started
with a dash. [GL #584]
5089. [bug] Restore localhost fallback in dig and host which is
@@ -93,7 +729,7 @@
5072. [bug] Add unit tests for isc_buffer_copyregion() and fix its
behavior for auto-reallocated buffers. [GL #644]
5071. [bug] Comparision of NXT records was broken. [GL #631]
5071. [bug] Comparison of NXT records was broken. [GL #631]
5070. [bug] Record types which support a empty rdata field were
not handling the empty rdata field case. [GL #638]
@@ -112,7 +748,7 @@
5065. [bug] Only set IPV6_USE_MIN_MTU on IPv6. [GL #553]
5064. [test] Initalize TZ environment variable before calling
5064. [test] Initialize TZ environment variable before calling
dns_test_begin in dnstap_test. [GL #624]
5063. [test] In statschannel test try a few times before failing
@@ -338,7 +974,7 @@
5001. [bug] Fix refcount errors on error paths. [GL !563]
5000. [bug] named_server_servestale() could leave the server in
exclusive mode if an error occured. [GL #441]
exclusive mode if an error occurred. [GL #441]
4999. [cleanup] Remove custom printf implementation in lib/isc/print.c.
[GL #261]

79
CODE_OF_CONDUCT Normal file
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
CODE_OF_CONDUCT.md Normal file
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.

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.

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/).

View File

@@ -1,4 +1,4 @@
Copyright (C) 1996-2018 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 1996-2019 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this

84
HISTORY
View File

@@ -1,5 +1,81 @@
HISTORY
Functional enhancements from prior major releases of BIND 9
BIND 9.14
BIND 9.14 (a stable branch based on the 9.13 development branch) includes
a number of changes from BIND 9.12 and earlier releases. New features
include:
* A new "plugin" mechanism has been added to allow query functionality
to be extended using dynamically loadable libraries. The "filter-aaaa"
feature has been removed from named and is now implemented as a
plugin.
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root
zone.
* Secondary zones can now be configured as "mirror" zones; their
contents are transferred in as with traditional slave zones, but are
subject to DNSSEC validation and are not treated as authoritative data
when answering. This makes it easier to configure a local copy of the
root zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below
which DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with libidn2.
* "named -V" now outputs the default paths for files used by named and
other tools.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See https://dnsflagday.net for more details.
Cryptographic support has been modernized. BIND now uses the best
available pseudo-random number generator for the platform on which it's
built. Very old versions of OpenSSL are no longer supported. Cryptography
is now mandatory: building BIND without DNSSEC is no longer supported.
Special code to support certain legacy operating systems has also been
removed; see the file PLATFORMS.md for details of supported platforms. In
addition to OpenSSL, BIND now requires support for IPv6, threads, and
standard atomic operations provided by the C compiler.
BIND 9.12
BIND 9.12 includes a number of changes from BIND 9.11 and earlier
releases. New features include:
* named and related libraries have been substantially refactored for
improved query performance -- particularly on delegation heavy zones
-- and for improved readability, maintainability, and testability.
* Code implementing the name server query processing logic has been
moved into a new libns library, for easier testing and use in tools
other than named.
* Cached, validated NSEC and other records can now be used to synthesize
NXDOMAIN responses.
* The DNS Response Policy Service API (DNSRPS) is now supported.
* Setting 'max-journal-size default' now limits the size of journal
files to twice the size of the zone.
* dnstap-read -x prints a hex dump of the wire format of each logged DNS
message.
* dnstap output files can now be configured to roll automatically when
reaching a given size.
* Log file timestamps can now also be formatted in ISO 8601 (local) or
ISO 8601 (UTC) formats.
* Logging channels and dnstap output files can now be configured to use
a timestamp as the suffix when rolling to a new file.
* 'named-checkconf -l' lists zones found in named.conf.
* Added support for the EDNS Padding and Keepalive options.
* 'new-zones-directory' option sets the location where the configuration
data for zones added by rndc addzone is stored.
* The default key algorithm in rndc-confgen is now hmac-sha256.
* filter-aaaa-on-v4 and filter-aaaa-on-v6 options are now available by
default without a configure option.
* The obsolete isc-hmac-fixup command has been removed.
BIND 9.11
BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier
@@ -431,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.

View File

@@ -10,6 +10,81 @@
-->
### Functional enhancements from prior major releases of BIND 9
#### BIND 9.14
BIND 9.14 (a stable branch based on the 9.13 development branch)
includes a number of changes from BIND 9.12 and earlier releases.
New features include:
* A new "plugin" mechanism has been added to allow query functionality
to be extended using dynamically loadable libraries. The "filter-aaaa"
feature has been removed from named and is now implemented as a plugin.
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root zone.
* Secondary zones can now be configured as "mirror" zones; their contents
are transferred in as with traditional slave zones, but are subject to
DNSSEC validation and are not treated as authoritative data when
answering. This makes it easier to configure a local copy of the root
zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below which
DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with `libidn2`.
* "named -V" now outputs the default paths for files used by named
and other tools.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
for more details.
Cryptographic support has been modernized. BIND now uses the
best available pseudo-random number generator for the platform on which
it's built. Very old versions of OpenSSL are no longer supported.
Cryptography is now mandatory: building BIND without DNSSEC is no
longer supported.
Special code to support certain legacy operating systems has also
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
of supported platforms. In addition to OpenSSL, BIND now requires
support for IPv6, threads, and standard atomic operations provided
by the C compiler.
#### BIND 9.12
BIND 9.12 includes a number of changes from BIND 9.11 and earlier releases.
New features include:
* `named` and related libraries have been substantially refactored for
improved query performance -- particularly on delegation heavy zones --
and for improved readability, maintainability, and testability.
* Code implementing the name server query processing logic has been moved
into a new `libns` library, for easier testing and use in tools other
than `named`.
* Cached, validated NSEC and other records can now be used to synthesize
NXDOMAIN responses.
* The DNS Response Policy Service API (DNSRPS) is now supported.
* Setting `'max-journal-size default'` now limits the size of journal files
to twice the size of the zone.
* `dnstap-read -x` prints a hex dump of the wire format of each logged
DNS message.
* `dnstap` output files can now be configured to roll automatically when
reaching a given size.
* Log file timestamps can now also be formatted in ISO 8601 (local) or ISO
8601 (UTC) formats.
* Logging channels and `dnstap` output files can now be configured to use a
timestamp as the suffix when rolling to a new file.
* `'named-checkconf -l'` lists zones found in `named.conf`.
* Added support for the EDNS Padding and Keepalive options.
* 'new-zones-directory' option sets the location where the configuration
data for zones added by rndc addzone is stored.
* The default key algorithm in `rndc-confgen` is now hmac-sha256.
* `filter-aaaa-on-v4` and `filter-aaaa-on-v6` options are now available
by default without a configure option.
* The obsolete `isc-hmac-fixup` command has been removed.
#### BIND 9.11
BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier

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;}' > $@

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.

View File

@@ -1,3 +1,5 @@
PLATFORMS
Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
@@ -13,49 +15,50 @@ offer support on a "best effort" basis for some.
Regularly tested platforms
As of May 2018, BIND 9.13 is tested on the following systems:
As of Feb 2019, BIND 9.15 is fully supported and regularly tested on the
following systems:
* Debian 8, 9
* Debian 8, 9, 10
* Ubuntu 16.04, 18.04
* Fedora 27, 28
* Red Hat/CentOS 6, 7
* FreeBSD 10.x, 11.x
* OpenBSD 6.3
* Fedora 28, 29
* Red Hat Enterprise Linux / CentOS 6, 7
* FreeBSD 11.x
* OpenBSD 6.2, 6.3
The amd64, i386, armhf and arm64 CPU architectures are all fully
supported.
Best effort
The following are platforms on which BIND is known to build and run, but
on which it is not routinely tested. ISC makes every effort to fix bugs on
these platforms, but may be unable to do so quickly due to lack of
hardware, less familiarity on the part of engineering staff, and other
constraints.
The following are platforms on which BIND is known to build and run. ISC
makes every effort to fix bugs on these platforms, but may be unable to do
so quickly due to lack of hardware, less familiarity on the part of
engineering staff, and other constraints. With the exception of Windows
Server 2012 R2, none of these are tested regularly by ISC.
* Windows 10 / x64
* Windows Server 2012 R2, 2016 / x64
* Windows 10 / x64
* macOS 10.12+
* Solaris 10
* FreeBSD 12+
* OpenBSD 6.2
* Solaris 11
* FreeBSD 10.x, 12.0+
* OpenBSD 6.4+
* NetBSD
* Older or less popular Linux distributions still supported by their
vendors, such as:
* Other Linux distributions still supported by their vendors, such as:
+ Ubuntu 14.04, 18.10+
+ Gentoo
+ ArchLinux
+ Arch Linux
+ Alpine Linux
* OpenWRT/LEDE 17.0
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
Unsupported platforms
These are platforms on which BIND is known not to build or run:
These are platforms on which BIND 9.15 is known not to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Solaris 10 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or
library)
@@ -63,27 +66,10 @@ These are platforms on which BIND is known not to build or run:
Platform quirks
ARM
NetBSD 6 i386
If the compilation ends with following error:
The i386 build of NetBSD requires the libatomic library, available from
the gcc5-libs package. Because this library is in a non-standard path, its
location must be specified in the configure command line:
Error: selected processor does not support `yield' in ARM mode
You will need to set -march compiler option to native, so the compiler
recognizes yield assembler instruction. The proper way to set -march=
native would be to put it into CFLAGS, e.g. run ./configure like this:
CFLAGS="-march=native -Os -g" ./configure plus your usual options.
If that doesn't work, you can enforce the minimum CPU and FPU (taken from
Debian armhf documentation):
* The lowest worthwhile CPU implementation is Armv7-A, therefore the
recommended build option is -march=armv7-a.
* FPU should be set at VFPv3-D16 as they represent the miminum
specification of the processors to support here, therefore the
recommended build option is -mfpu=vfpv3-d16.
The configure command should look like this:
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure

View File

@@ -23,78 +23,61 @@ offer support on a "best effort" basis for some.
### Regularly tested platforms
As of May 2018, BIND 9.13 is tested on the following systems:
As of Feb 2019, BIND 9.15 is fully supported and regularly tested on the
following systems:
* Debian 8, 9
* Debian 8, 9, 10
* Ubuntu 16.04, 18.04
* Fedora 27, 28
* Red Hat/CentOS 6, 7
* FreeBSD 10.x, 11.x
* OpenBSD 6.3
* Fedora 28, 29
* Red Hat Enterprise Linux / CentOS 6, 7
* FreeBSD 11.x
* OpenBSD 6.2, 6.3
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
### Best effort
The following are platforms on which BIND is known to build and run,
but on which it is not routinely tested. ISC makes every effort to fix bugs
on these platforms, but may be unable to do so quickly due to lack of
hardware, less familiarity on the part of engineering staff, and other
constraints.
The following are platforms on which BIND is known to build and run.
ISC makes every effort to fix bugs on these platforms, but may be unable to
do so quickly due to lack of hardware, less familiarity on the part of
engineering staff, and other constraints. With the exception of Windows
Server 2012 R2, none of these are tested regularly by ISC.
* Windows 10 / x64
* Windows Server 2012 R2, 2016 / x64
* Windows 10 / x64
* macOS 10.12+
* Solaris 10
* FreeBSD 12+
* OpenBSD 6.2
* Solaris 11
* FreeBSD 10.x, 12.0+
* OpenBSD 6.4+
* NetBSD
* Older or less popular Linux distributions still supported by their vendors, such as:
* Other Linux distributions still supported by their vendors, such as:
* Ubuntu 14.04, 18.10+
* Gentoo
* ArchLinux
* Arch Linux
* Alpine Linux
* OpenWRT/LEDE 17.0
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
## Unsupported platforms
These are platforms on which BIND is known *not* to build or run:
These are platforms on which BIND 9.15 is known *not* to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Solaris 10 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or library)
* Linux without NPTL (Native POSIX Thread Library)
## Platform quirks
### ARM
### NetBSD 6 i386
If the compilation ends with following error:
The i386 build of NetBSD requires the `libatomic` library, available from
the `gcc5-libs` package. Because this library is in a non-standard path,
its location must be specified in the `configure` command line:
```
Error: selected processor does not support `yield' in ARM mode
```
You will need to set `-march` compiler option to `native`, so the compiler
recognizes `yield` assembler instruction. The proper way to set `-march=native`
would be to put it into `CFLAGS`, e.g. run `./configure` like this:
`CFLAGS="-march=native -Os -g" ./configure` plus your usual options.
If that doesn't work, you can enforce the minimum CPU and FPU (taken from Debian
armhf documentation):
* The lowest worthwhile CPU implementation is Armv7-A, therefore the recommended
build option is `-march=armv7-a`.
* FPU should be set at VFPv3-D16 as they represent the miminum specification of
the processors to support here, therefore the recommended build option is
`-mfpu=vfpv3-d16`.
The configure command should look like this:
```
CFLAGS="-march=armv7-a -mfpu=vfpv3-d16 -Os -g" ./configure
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
```

168
README
View File

@@ -1,3 +1,5 @@
README
BIND 9
Contents
@@ -5,14 +7,15 @@ Contents
1. Introduction
2. Reporting bugs and getting help
3. Contributing to BIND
4. BIND 9.13 features
4. BIND 9.15 features
5. Building BIND
6. macOS
7. Compile-time options
8. Automated testing
9. Documentation
10. Change log
11. Acknowledgments
7. Dependencies
8. Compile-time options
9. Automated testing
10. Documentation
11. Change log
12. Acknowledgments
Introduction
@@ -36,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
@@ -84,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.
@@ -99,39 +103,13 @@ If you prefer, you may also submit code by opening a GitLab Issue and
including your patch as an attachment, preferably generated by git
format-patch.
BIND 9.13 features
BIND 9.15 features
BIND 9.13 is the newest development branch of BIND 9. It includes a number
of changes from BIND 9.12 and earlier releases. New features include:
BIND 9.15 is the newest development branch of BIND 9. It includes a number
of changes from BIND 9.14 and earlier releases. New features include:
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root
zone.
* Secondary zones can now be configured as "mirror" zones; their
contents are transferred in as with traditional slave zones, but are
subject to DNSSEC validation and are not treated as authoritative data
when answering. This makes it easier to configure a local copy of the
root zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below
which DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with libidn2.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See https://dnsflagday.net for more details.
Cryptographic support has been modernized. BIND now uses the best
available pseudo-random number generator for the platform on which it's
built. Very old versions of OpenSSL are no longer supported. Cryptography
is now mandatory: building BIND without DNSSEC is now longer supported.
Special code to support certain legacy operating systems has also been
removed; see the file PLATFORMS.md for details of supported platforms. In
addition to OpenSSL, BIND now requires support for IPv6, threads, and
standard atomic operations provided by the C compiler.
* Support for the new GeoIP2 geolocation API
* Improved DNSSEC key configuration using dnssec-keys
Building BIND
@@ -162,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
@@ -190,30 +168,21 @@ if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and
other tools so that they can be easily found.
Dependencies
Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
'argparse' and 'ply' modules to be available. 'argparse' is a standard
module as of Python 2.7 and Python 3.2. 'ply' is available from https://
pypi.python.org/pypi/ply.
Compile-time options
To see a full list of configuration options, run configure --help.
On most platforms, BIND 9 is built with multithreading support, allowing
it to take advantage of multiple CPUs. You can configure this by
specifying --enable-threads or --disable-threads on the configure command
line. The default is to enable threads, except on some older operating
systems on which threads are known to have had problems in the past.
(Note: Prior to BIND 9.10, the default was to disable threads on Linux
systems; this has now been reversed. On Linux systems, the threaded build
is known to change BIND's behavior with respect to file permissions; it
may be necessary to specify a user with the -u option when running named.)
To build shared libraries, specify --with-libtool on the configure command
line.
Certain compiled-in constants and default settings can be increased to
values better suited to large servers with abundant memory resources (e.g,
64-bit servers with 12G or more of memory) by specifying --with-tuning=
large on the configure command line. This can improve performance on big
servers, but will consume more memory and may degrade performance on
smaller systems.
For the server to support DNSSEC, you need to build it with crypto
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
installed. If the OpenSSL library is installed in a nonstandard location,
@@ -224,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,
@@ -235,27 +206,29 @@ 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://
developers.google.com/protocol-buffers, and BIND must be configured with
--enable-dnstap.
Certain compiled-in constants and default settings can be increased to
values better suited to large servers with abundant memory resources (e.g,
64-bit servers with 12G or more of memory) by specifying --with-tuning=
large on the configure command line. This can improve performance on big
servers, but will consume more memory and may degrade performance on
smaller systems.
On Linux, process capabilities are managed in user space using the libcap
library, which can be installed on most Linux systems via the libcap-dev
or libcap-devel module. Process capability support can also be disabled by
configuring with --disable-linux-caps.
Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
'argparse' and 'ply' modules to be available. 'argparse' is a standard
module as of Python 2.7 and Python 3.2. 'ply' is available from https://
pypi.python.org/pypi/ply.
On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using
--enable-largefile on the configure command line.
@@ -265,17 +238,18 @@ specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
command line. By default, fixed rrset-order is disabled to reduce memory
footprint.
The --enable-querytrace option causes named to log every step of
processing every query. This should only be enabled when debugging,
because it has a significant negative impact on query performance.
make install will install named and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the
--prefix option when running configure.
You may specify the option --sysconfdir to set the directory where
configuration files like named.conf go by default, and --localstatedir to
set the default parent directory of run/named.pid. 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
@@ -318,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
@@ -346,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)

129
README.md
View File

@@ -15,9 +15,10 @@
1. [Introduction](#intro)
1. [Reporting bugs and getting help](#help)
1. [Contributing to BIND](#contrib)
1. [BIND 9.13 features](#features)
1. [BIND 9.15 features](#features)
1. [Building BIND](#build)
1. [macOS](#macos)
1. [Dependencies](#dependencies)
1. [Compile-time options](#opts)
1. [Automated testing](#testing)
1. [Documentation](#doc)
@@ -47,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).
@@ -97,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)
@@ -116,42 +118,15 @@ If you prefer, you may also submit code by opening a
including your patch as an attachment, preferably generated by
`git format-patch`.
### <a name="features"/> BIND 9.13 features
### <a name="features"/> BIND 9.15 features
BIND 9.13 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.12 and earlier releases. New features
BIND 9.15 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.14 and earlier releases. New features
include:
* Socket and task code has been refactored to improve performance.
* QNAME minimization, as described in RFC 7816, is now supported.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root zone.
* Secondary zones can now be configured as "mirror" zones; their contents
are transferred in as with traditional slave zones, but are subject to
DNSSEC validation and are not treated as authoritative data when
answering. This makes it easier to configure a local copy of the root
zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below which
DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with `libidn2`.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
for more details.
Cryptographic support has been modernized. BIND now uses the
best available pseudo-random number generator for the platform on which
it's built. Very old versions of OpenSSL are no longer supported.
Cryptography is now mandatory: building BIND without DNSSEC is now
longer supported.
Special code to support certain legacy operating systems has also
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
of supported platforms. In addition to OpenSSL, BIND now requires
support for IPv6, threads, and standard atomic operations provided
by the C compiler.
* 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
@@ -204,31 +179,21 @@ or if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and other
tools so that they can be easily found.
### <a name="dependencies"/> Dependencies
Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
system tests, require the 'argparse' and 'ply' modules to be available.
'argparse' is a standard module as of Python 2.7 and Python 3.2.
'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
#### <a name="opts"/> Compile-time options
To see a full list of configuration options, run `configure --help`.
On most platforms, BIND 9 is built with multithreading support, allowing it
to take advantage of multiple CPUs. You can configure this by specifying
`--enable-threads` or `--disable-threads` on the `configure` command line.
The default is to enable threads, except on some older operating systems on
which threads are known to have had problems in the past. (Note: Prior to
BIND 9.10, the default was to disable threads on Linux systems; this has
now been reversed. On Linux systems, the threaded build is known to change
BIND's behavior with respect to file permissions; it may be necessary to
specify a user with the -u option when running `named`.)
To build shared libraries, specify `--with-libtool` on the `configure`
command line.
Certain compiled-in constants and default settings can be increased to
values better suited to large servers with abundant memory resources (e.g,
64-bit servers with 12G or more of memory) by specifying
`--with-tuning=large` on the `configure` command line. This can improve
performance on big servers, but will consume more memory and may degrade
performance on smaller systems.
For the server to support DNSSEC, you need to build it with crypto support.
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
OpenSSL library is installed in a nonstandard location, specify the prefix
@@ -241,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,
@@ -252,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)
@@ -263,17 +231,18 @@ and libprotobuf-c
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
and BIND must be configured with `--enable-dnstap`.
Certain compiled-in constants and default settings can be increased to
values better suited to large servers with abundant memory resources (e.g,
64-bit servers with 12G or more of memory) by specifying
`--with-tuning=large` on the `configure` command line. This can improve
performance on big servers, but will consume more memory and may degrade
performance on smaller systems.
On Linux, process capabilities are managed in user space using
the `libcap` library, which can be installed on most Linux systems via
the `libcap-dev` or `libcap-devel` module. Process capability support can
also be disabled by configuring with `--disable-linux-caps`.
Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
system tests, require the 'argparse' and 'ply' modules to be available.
'argparse' is a standard module as of Python 2.7 and Python 3.2.
'ply' is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using
`--enable-largefile` on the `configure` command line.
@@ -283,17 +252,18 @@ specifying `--enable-fixed-rrset` or `--disable-fixed-rrset` on the
configure command line. By default, fixed rrset-order is disabled to
reduce memory footprint.
The `--enable-querytrace` option causes `named` to log every step of
processing every query. This should only be enabled when debugging, because
it has a significant negative impact on query performance.
`make install` will install `named` and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the
`--prefix` option when running `configure`.
You may specify the option `--sysconfdir` to set the directory where
configuration files like `named.conf` go by default, and `--localstatedir`
to set the default parent directory of `run/named.pid`. 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
@@ -359,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

89
aclocal.m4 vendored
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])

View File

@@ -12,7 +12,7 @@ VPATH = @srcdir@
top_srcdir = @top_srcdir@
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests
TARGETS =
@BIND9_MAKE_RULES@

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@
@@ -66,7 +67,7 @@ named-checkzone.@O@: named-checkzone.c
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
export LIBS0="${NSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
export LIBS0="${BIND9LIBS} ${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
${FINALBUILDCMD}
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \

View File

@@ -12,8 +12,6 @@
/*! \file */
#include <config.h>
#include <stdbool.h>
#include <stdio.h>
#include <inttypes.h>
@@ -142,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,
@@ -668,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)

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -39,7 +39,7 @@
named-checkconf \- named configuration file syntax checking tool
.SH "SYNOPSIS"
.HP \w'\fBnamed\-checkconf\fR\ 'u
\fBnamed\-checkconf\fR [\fB\-hjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
\fBnamed\-checkconf\fR [\fB\-chjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
.SH "DESCRIPTION"
.PP
\fBnamed\-checkconf\fR
@@ -79,6 +79,18 @@ When loading a zonefile read the journal if it exists\&.
List all the configured zones\&. Each line of output contains the zone name, class (e\&.g\&. IN), view, and type (e\&.g\&. master or slave)\&.
.RE
.PP
\-c
.RS 4
Check "core" configuration only\&. This suppresses the loading of plugin modules, and causes all parameters to
\fBplugin\fR
statements to be ignored\&.
.RE
.PP
\-i
.RS 4
Ignore warnings on deprecated options\&.
.RE
.PP
\-p
.RS 4
Print out the
@@ -136,5 +148,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -12,8 +12,6 @@
/*! \file */
#include <config.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -30,6 +28,7 @@
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <isccfg/grammar.h>
#include <bind9/check.h>
@@ -46,6 +45,8 @@
static const char *program = "named-checkconf";
static bool loadplugins = true;
isc_log_t *logc = NULL;
#define CHECK(r)\
@@ -61,7 +62,7 @@ usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
fprintf(stderr, "usage: %s [-hjlvz] [-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 "dhjlm:t:pvxz"
#define CMDLINE_FLAGS "cdhijlm:t:pvxz"
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (c) {
case 'm':
@@ -587,10 +589,18 @@ main(int argc, char **argv) {
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
switch (c) {
case 'c':
loadplugins = false;
break;
case 'd':
debug++;
break;
case 'i':
nodeprecate = true;
break;
case 'j':
nomerge = false;
break;
@@ -671,15 +681,21 @@ 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, logc, mctx);
if (result != ISC_R_SUCCESS)
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
if (result != ISC_R_SUCCESS) {
exit_status = 1;
}
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
result = load_zones_fromconfig(config, mctx, list_zones);

View File

@@ -40,6 +40,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -52,7 +53,7 @@
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>named-checkconf</command>
<arg choice="opt" rep="norepeat"><option>-hjlvz</option></arg>
<arg choice="opt" rep="norepeat"><option>-chjlvz</option></arg>
<arg choice="opt" rep="norepeat"><option>-p</option>
<arg choice="opt" rep="norepeat"><option>-x</option>
</arg></arg>
@@ -114,6 +115,26 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-c</term>
<listitem>
<para>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<command>plugin</command> statements to be ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-i</term>
<listitem>
<para>
Ignore warnings on deprecated options.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p</term>
<listitem>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -33,7 +33,7 @@
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">named-checkconf</code>
[<code class="option">-hjlvz</code>]
[<code class="option">-chjlvz</code>]
[<code class="option">-p</code>
[<code class="option">-x</code>
]]
@@ -88,6 +88,20 @@
(e.g. master or slave).
</p>
</dd>
<dt><span class="term">-c</span></dt>
<dd>
<p>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<span class="command"><strong>plugin</strong></span> statements to be ignored.
</p>
</dd>
<dt><span class="term">-i</span></dt>
<dd>
<p>
Ignore warnings on deprecated options.
</p>
</dd>
<dt><span class="term">-p</span></dt>
<dd>
<p>

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -325,5 +325,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -12,8 +12,6 @@
/*! \file */
#include <config.h>
#include <stdbool.h>
#include <stdlib.h>
#include <inttypes.h>

View File

@@ -43,6 +43,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@@ -62,6 +62,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -89,6 +90,7 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -65,6 +65,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -88,6 +89,7 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -62,6 +62,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -95,6 +96,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

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@

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -144,5 +144,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -17,8 +17,6 @@
* and the corresponding key and update-policy statements in named.conf.
*/
#include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -224,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;
}

View File

@@ -37,6 +37,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2009, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@@ -12,8 +12,6 @@
/*! \file */
#include <config.h>
#include <stdlib.h>
#include <stdarg.h>

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -206,5 +206,5 @@ BIND 9 Administrator Reference Manual\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -20,8 +20,6 @@
* controls statement altogether.
*/
#include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -224,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);

View File

@@ -44,6 +44,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@@ -12,8 +12,6 @@
/*! \file */
#include <config.h>
#include <confgen/os.h>
#include <fcntl.h>

View File

@@ -12,8 +12,6 @@
/*! \file */
#include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>

View File

@@ -60,6 +60,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -84,6 +85,7 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -62,6 +62,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -95,6 +96,7 @@ copy /Y ddns-confgen.ilk tsig-keygen.ilk
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -9,9 +9,6 @@
* information regarding copyright ownership.
*/
#include <config.h>
#include <confgen/os.h>
#include <fcntl.h>

View File

@@ -62,6 +62,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -89,6 +90,7 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

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@

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -53,7 +53,7 @@ is a tool for sending DNS queries and validating the results, using the same int
\fBnamed\fR\&.
.PP
\fBdelv\fR
will send to a specified name server all queries needed to fetch and validate the requested data; this includes the original requested query, subsequent queries to follow CNAME or DNAME chains, and queries for DNSKEY, 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\&.
@@ -437,5 +428,5 @@ RFC5155\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2014-2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
#include <config.h>
#include <bind.keys.h>
#ifndef WIN32
@@ -112,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,
@@ -126,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
@@ -162,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"
@@ -182,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"
@@ -191,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"
@@ -355,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
@@ -428,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;
@@ -437,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) {
@@ -470,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);
@@ -505,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);
}
@@ -578,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"));
@@ -643,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)
@@ -694,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
@@ -715,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) {
@@ -743,28 +786,32 @@ setup_dnsseckeys(dns_client_t *client) {
isc_buffer_init(&b, anchortext, sizeof(anchortext) - 1);
isc_buffer_add(&b, sizeof(anchortext) - 1);
result = cfg_parse_buffer(parser, &b, &cfg_type_bindkeys,
&bindkeys);
if (result != ISC_R_SUCCESS)
result = cfg_parse_buffer(parser, &b, NULL, 0,
&cfg_type_bindkeys, 0, &bindkeys);
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) {
@@ -773,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);
}
@@ -802,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);
@@ -812,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);
@@ -841,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);
@@ -917,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);
@@ -929,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);
@@ -1028,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 */
@@ -1069,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 */
@@ -1158,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:
/*
@@ -1221,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':
@@ -1253,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, '#');
@@ -1318,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;
@@ -1347,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;
@@ -1495,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");
}
}
}
@@ -1510,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;
@@ -1595,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;
@@ -1623,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);
@@ -1666,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;
@@ -1698,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)

View File

@@ -39,6 +39,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -95,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
@@ -210,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>.
@@ -616,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>
@@ -626,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
@@ -637,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>
@@ -670,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>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2014-2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -83,7 +83,7 @@
<span class="command"><strong>delv</strong></span> will send to a specified name server all
queries needed to fetch and validate the requested data; this
includes the original requested query, subsequent queries to follow
CNAME or DNAME chains, and queries for DNSKEY, 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>

View File

@@ -60,7 +60,8 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<AdditionalIncludeDirectories>..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
@@ -87,7 +88,8 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<AdditionalIncludeDirectories>..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

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@

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -361,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
@@ -450,6 +456,11 @@ clears the EDNS options to be sent\&.
Send an EDNS Expire option\&.
.RE
.PP
\fB+[no]expandaaaa\fR
.RS 4
When printing AAAA record print all zero nibbles rather than the default RFC 5952 preferred presentation format\&.
.RE
.PP
\fB+[no]fail\fR
.RS 4
Do not try the next server if you receive a SERVFAIL\&. The default is to not try the next server which is the reverse of normal stub resolver behavior\&.
@@ -561,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
@@ -584,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
@@ -619,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
@@ -649,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
@@ -824,5 +835,5 @@ There are probably too many query options\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -11,8 +11,6 @@
/*! \file */
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -66,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 */
@@ -175,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"
@@ -189,17 +190,20 @@ help(void) {
" +[no]ednsnegotiation (Set EDNS version negotiation)\n"
" +ednsopt=###[:value] (Send specified EDNS option)\n"
" +noednsopt (Clear list of +ednsopt options)\n"
" +[no]expandaaaa (Expand AAAA records)\n"
" +[no]expire (Request time to expire)\n"
" +[no]fail (Don't try next server on SERVFAIL)\n"
" +[no]header-only (Send query without a question section)\n"
" +[no]identify (ID responders in short answers)\n"
#ifdef HAVE_LIBIDN2
" +[no]idnin (Parse IDN names [default=on on tty])\n"
" +[no]idnout (Convert IDN response [default=on on tty])\n"
" +[no]idnout (Convert IDN response "
"[default=on on tty])\n"
#endif
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
" +[no]keepalive (Request EDNS TCP keepalive)\n"
" +[no]keepopen (Keep the TCP socket open between queries)\n"
" +[no]keepopen (Keep the TCP socket open between "
"queries)\n"
" +[no]mapped (Allow mapped IPv4 over IPv6)\n"
" +[no]multiline (Print records in an expanded format)\n"
" +ndots=### (Set search NDOTS value)\n"
@@ -218,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"
@@ -226,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"
@@ -257,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);
@@ -278,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, "
@@ -293,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);
}
}
}
@@ -355,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);
}
@@ -408,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");
@@ -451,60 +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->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",
@@ -525,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)) {
@@ -676,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));
@@ -1036,8 +1178,24 @@ plus_option(char *option, bool is_batchfile,
}
break;
case 'x':
FULLCHECK("expire");
lookup->expire = state;
switch (cmd[2]) {
case 'p':
switch(cmd[3]) {
case 'a':
FULLCHECK("expandaaaa");
lookup->expandaaaa = state;
break;
case 'i':
FULLCHECK("expire");
lookup->expire = state;
break;
default:
goto invalid_option;
}
break;
default:
goto invalid_option;
}
break;
default:
goto invalid_option;
@@ -1445,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;
@@ -1519,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;
@@ -2231,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);
@@ -2246,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);

View File

@@ -52,6 +52,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -592,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>
@@ -603,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>
@@ -746,6 +759,16 @@
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]expandaaaa</option></term>
<listitem>
<para>
When printing AAAA record print all zero nibbles rather
than the default RFC 5952 preferred presentation format.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]fail</option></term>
<listitem>
@@ -954,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>
@@ -964,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>
@@ -999,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>
@@ -1053,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>
@@ -1098,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>
@@ -1266,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>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2011, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -481,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>
@@ -598,6 +610,13 @@
Send an EDNS Expire option.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]expandaaaa</code></span></dt>
<dd>
<p>
When printing AAAA record print all zero nibbles rather
than the default RFC 5952 preferred presentation format.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
<dd>
<p>
@@ -757,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>
@@ -790,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>
@@ -832,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>
@@ -865,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>

View File

@@ -19,8 +19,6 @@
* functions in most applications.
*/
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -195,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);
@@ -448,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);
@@ -578,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;
@@ -623,6 +619,7 @@ make_empty_lookup(void) {
looknew->nocrypto = false;
looknew->ttlunits = false;
looknew->ttlunits = false;
looknew->expandaaaa = false;
looknew->qr = false;
#ifdef HAVE_LIBIDN2
looknew->idnin = isatty(1)?(getenv("IDN_DISABLE") == NULL):false;
@@ -682,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;
@@ -697,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);
}
@@ -771,6 +764,7 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
looknew->use_usec = lookold->use_usec;
looknew->nocrypto = lookold->nocrypto;
looknew->ttlunits = lookold->ttlunits;
looknew->expandaaaa = lookold->expandaaaa;
looknew->qr = lookold->qr;
looknew->idnin = lookold->idnin;
looknew->idnout = lookold->idnout;
@@ -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);
@@ -1390,8 +1374,7 @@ setup_libs(void) {
isc_mempool_setfreemax(commctx, 6);
isc_mempool_setfillcount(commctx, 2);
result = isc_mutex_init(&lookup_lock);
check_result(result, "isc_mutex_init");
isc_mutex_init(&lookup_lock);
}
typedef struct dig_ednsoptname {
@@ -1400,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 */
@@ -1412,6 +1396,8 @@ dig_ednsoptname_t optnames[] = {
{ 12, "PAD" }, /* shorthand */
{ 13, "CHAIN" }, /* RFC 7901 */
{ 14, "KEY-TAG" }, /* RFC 8145 */
{ 16, "CLIENT-TAG" }, /* draft-bellis-dnsop-edns-tags */
{ 17, "SERVER-TAG" }, /* draft-bellis-dnsop-edns-tags */
{ 26946, "DEVICEID" }, /* Brian Hartvigsen */
};
@@ -1455,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");
@@ -2190,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 &&
@@ -2486,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;
@@ -2524,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);
@@ -2532,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);
}
@@ -2731,27 +2706,6 @@ send_tcp_connect(dig_query_t *query) {
return;
}
if (specified_source &&
(isc_sockaddr_pf(&query->sockaddr) !=
isc_sockaddr_pf(&bind_address))) {
printf(";; Skipping server %s, incompatible "
"address family\n", query->servname);
query->waiting_connect = false;
if (ISC_LINK_LINKED(query, link))
next = ISC_LIST_NEXT(query, link);
else
next = NULL;
l = query->lookup;
clear_query(query);
if (next == NULL) {
printf(";; No acceptable nameservers\n");
check_next_lookup(l);
return;
}
send_tcp_connect(next);
return;
}
INSIST(query->sock == NULL);
if (keep != NULL && isc_sockaddr_equal(&keepaddr, &query->sockaddr)) {
@@ -2900,6 +2854,48 @@ 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));
}
}
}
/*%
* If there are more servers available for querying within 'lookup', initiate a
* TCP or UDP query to the next available server and return true; otherwise,
* return false.
*/
static bool
try_next_server(dig_lookup_t *lookup) {
dig_query_t *current_query, *next_query;
current_query = lookup->current_query;
if (current_query == NULL || !ISC_LINK_LINKED(current_query, link)) {
return (false);
}
next_query = ISC_LIST_NEXT(current_query, link);
if (next_query == NULL) {
return (false);
}
debug("trying next server...");
if (lookup->tcp_mode) {
send_tcp_connect(next_query);
} else {
send_udp(next_query);
}
return (true);
}
/*%
@@ -2910,7 +2906,7 @@ send_udp(dig_query_t *query) {
static void
connect_timeout(isc_task_t *task, isc_event_t *event) {
dig_lookup_t *l = NULL;
dig_query_t *query = NULL, *cq;
dig_query_t *query = NULL;
UNUSED(task);
REQUIRE(event->ev_type == ISC_TIMEREVENT_IDLE);
@@ -2930,18 +2926,14 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
return;
}
if ((query != NULL) && (query->lookup->current_query != NULL) &&
ISC_LINK_LINKED(query->lookup->current_query, link) &&
(ISC_LIST_NEXT(query->lookup->current_query, link) != NULL)) {
debug("trying next server...");
cq = query->lookup->current_query;
if (!l->tcp_mode)
send_udp(ISC_LIST_NEXT(cq, link));
else {
if (query->sock != NULL)
if (try_next_server(l)) {
if (l->tcp_mode) {
if (query->sock != NULL) {
isc_socket_cancel(query->sock, NULL,
ISC_SOCKCANCEL_ALL);
send_tcp_connect(ISC_LIST_NEXT(cq, link));
} else {
clear_query(query);
}
}
UNLOCK_LOOKUP;
return;
@@ -2973,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);
@@ -2987,6 +2979,27 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
UNLOCK_LOOKUP;
}
/*%
* Called when a peer closes a TCP socket prematurely.
*/
static void
requeue_or_update_exitcode(dig_lookup_t *lookup) {
if (lookup->eoferr == 0U) {
/*
* Peer closed the connection prematurely for the first time
* for this lookup. Try again, keeping track of this failure.
*/
dig_lookup_t *requeued_lookup = requeue_lookup(lookup, true);
requeued_lookup->eoferr++;
} else {
/*
* Peer closed the connection prematurely and it happened
* previously for this lookup. Indicate an error.
*/
exitcode = 9;
}
}
/*%
* Event handler for the TCP recv which gets the length header of TCP
* packets. Start the next recv of length bytes.
@@ -2998,7 +3011,7 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
isc_region_t r;
isc_result_t result;
dig_query_t *query = NULL;
dig_lookup_t *l, *n;
dig_lookup_t *l;
uint16_t length;
REQUIRE(event->ev_type == ISC_SOCKEVENT_RECVDONE);
@@ -3028,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;
@@ -3037,9 +3050,8 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) {
sockcount--;
debug("sockcount=%d", sockcount);
INSIST(sockcount >= 0);
if (sevent->result == ISC_R_EOF && l->eoferr == 0U) {
n = requeue_lookup(l, true);
n->eoferr++;
if (sevent->result == ISC_R_EOF) {
requeue_or_update_exitcode(l);
}
isc_event_free(&event);
clear_query(query);
@@ -3129,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
@@ -3398,7 +3423,7 @@ process_cookie(dig_lookup_t *l, dns_message_t *msg,
}
INSIST(msg->cc_ok == 0 && msg->cc_bad == 0);
if (optlen >= len && optlen >= 8U) {
if (len >= 8 && optlen >= 8U) {
if (isc_safe_memequal(isc_buffer_current(optbuf), sent, 8)) {
msg->cc_ok = 1;
} else {
@@ -3485,6 +3510,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
dig_lookup_t *n, *l;
bool docancel = false;
bool match = true;
bool done_process_opt = false;
unsigned int parseflags;
dns_messageid_t id;
unsigned int msgflags;
@@ -3502,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;
@@ -3531,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);
@@ -3540,9 +3565,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
debug("sockcount=%d", sockcount);
INSIST(sockcount >= 0);
}
if (sevent->result == ISC_R_EOF && l->eoferr == 0U) {
n = requeue_lookup(l, true);
n->eoferr++;
if (sevent->result == ISC_R_EOF) {
requeue_or_update_exitcode(l);
}
isc_event_free(&event);
clear_query(query);
@@ -3779,6 +3803,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
UNLOCK_LOOKUP;
return;
}
done_process_opt = true;
}
if ((msg->rcode == dns_rcode_servfail && !l->servfail_stops) ||
(check_ra && (msg->flags & DNS_MESSAGEFLAG_RA) == 0 && l->recurse))
@@ -3868,30 +3893,34 @@ recv_done(isc_task_t *task, isc_event_t *event) {
}
}
if (l->cookie != NULL) {
if (msg->opt == NULL)
printf(";; expected opt record in response\n");
else
if (!done_process_opt) {
if (l->cookie != NULL) {
if (msg->opt == NULL) {
printf(";; expected opt record in response\n");
} else {
process_opt(l, msg);
}
} else if (l->sendcookie && msg->opt != NULL) {
process_opt(l, msg);
} else if (l->sendcookie && msg->opt != NULL)
process_opt(l, msg);
}
}
if (!l->doing_xfr || l->xfr_q == query) {
if (msg->rcode == dns_rcode_nxdomain &&
(l->origin != NULL || l->need_search)) {
if (!next_origin(query->lookup) || showsearch) {
dighost_printmessage(query, 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)) {
@@ -3922,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);
}
}
}
@@ -4199,7 +4228,7 @@ destroy_libs(void) {
}
UNLOCK_LOOKUP;
DESTROYLOCK(&lookup_lock);
isc_mutex_destroy(&lookup_lock);
debug("Removing log context");
isc_log_destroy(&lctx);

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -269,5 +269,5 @@ runs\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -11,8 +11,6 @@
/*! \file */
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -151,6 +149,7 @@ show_usage(void) {
" -s a SERVFAIL response should stop query\n"
" -t specifies the query type\n"
" -T enables TCP/IP mode\n"
" -U enables UDP mode\n"
" -v enables verbose output\n"
" -V print version number and exit\n"
" -w specifies to wait forever for a reply\n"
@@ -401,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);
/*
@@ -624,28 +626,29 @@ pre_parse_args(int argc, char **argv) {
case 'a': break;
case 'A': break;
case 'c': break;
case 'C': break;
case 'd': break;
case 'D':
if (debugging)
debugtiming = true;
debugging = true;
break;
case 'i': break;
case 'l': break;
case 'n': break;
case 'N': break;
case 'r': break;
case 'R': break;
case 's': break;
case 't': break;
case 'T': break;
case 'U': break;
case 'v': break;
case 'V':
version();
exit(0);
break;
case 'w': break;
case 'C': break;
case 'D':
if (debugging)
debugtiming = true;
debugging = true;
break;
case 'N': break;
case 'R': break;
case 'T': break;
case 'W': break;
default:
show_usage();
@@ -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];

View File

@@ -47,6 +47,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@@ -140,6 +140,7 @@ struct dig_lookup {
ttlunits,
idnin,
idnout,
expandaaaa,
qr;
char textname[MXNAME]; /*% Name we're going to be looking up */
char cmdline[MXNAME];
@@ -379,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

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2004-2007, 2010, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -301,5 +301,5 @@ runs or when the standard output is not a tty\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2004-2007, 2010, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -431,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);
@@ -852,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
@@ -879,12 +880,29 @@ get_next_command(void) {
isc_mem_free(mctx, buf);
}
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
fprintf(stderr, "Usage:\n");
fprintf(stderr,
" nslookup [-opt ...] # interactive mode using default server\n");
fprintf(stderr,
" nslookup [-opt ...] - server # interactive mode using 'server'\n");
fprintf(stderr,
" nslookup [-opt ...] host # just look up 'host' using default server\n");
fprintf(stderr,
" nslookup [-opt ...] host server # just look up 'host' using 'server'\n");
exit(1);
}
static void
parse_args(int argc, char **argv) {
bool have_lookup = false;
usesearch = true;
for (argc--, argv++; argc > 0; argc--, argv++) {
for (argc--, argv++; argc > 0 && argv[0] != NULL; argc--, argv++) {
debug("main parsing %s", argv[0]);
if (argv[0][0] == '-') {
if (strncasecmp(argv[0], "-ver", 4) == 0) {
@@ -900,6 +918,9 @@ parse_args(int argc, char **argv) {
in_use = true;
addlookup(argv[0]);
} else {
if (argv[1] != NULL) {
usage();
}
set_nameserver(argv[0]);
check_ra = false;
}
@@ -962,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;
@@ -979,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");

View File

@@ -71,6 +71,7 @@
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2004-2007, 2010, 2013-2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@@ -60,6 +60,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -87,6 +88,7 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -60,6 +60,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -85,6 +86,7 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -60,6 +60,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -87,6 +88,7 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -60,6 +60,7 @@
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
@@ -87,6 +88,7 @@
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles>
<AdditionalIncludeDirectories>.\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>

View File

@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

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@

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -102,7 +102,7 @@ Specify a digest algorithm to use when converting CDNSKEY records to DS records\
.sp
The
\fIalgorithm\fR
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), or SHA\-384 (SHA384)\&. These values are case insensitive\&. If no algorithm is specified, the default is SHA\-256\&.
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&.
.RE
.PP
\-c \fIclass\fR
@@ -293,5 +293,5 @@ RFC 7344\&.
.RE
.SH "COPYRIGHT"
.br
Copyright \(co 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2017-2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -16,8 +16,6 @@
/*! \file */
#include <config.h>
#include <errno.h>
#include <inttypes.h>
#include <stdbool.h>
@@ -61,12 +59,7 @@
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-cds";
int verbose;
/*
* Infrastructure
@@ -82,12 +75,6 @@ static dns_fixedname_t fixed;
static dns_name_t *name = NULL;
static dns_rdataclass_t rdclass = dns_rdataclass_in;
/*
* List of digest types used by ds_from_cdnskey(), filled in by add_dtype()
* from -a arguments. The size of the array is an arbitrary limit.
*/
static uint8_t dtype[8];
static const char *startstr = NULL; /* from which we derive notbefore */
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
static dns_rdata_rrsig_t oldestsig; /* for recording inception time */
@@ -129,7 +116,7 @@ static int nkey; /* number of child zone DNSKEY records */
typedef struct keyinfo {
dns_rdata_t rdata;
dst_key_t *dst;
uint8_t algo;
dns_secalg_t algo;
dns_keytag_t tag;
} keyinfo_t;
@@ -482,7 +469,6 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
dns_rdata_ds_t ds;
dns_rdata_t dsrdata = DNS_RDATA_INIT;
dns_rdata_t newdsrdata = DNS_RDATA_INIT;
dns_rdatatype_t keytype;
bool c;
dns_rdataset_current(dsset, &dsrdata);
@@ -493,12 +479,8 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
continue;
}
/* allow for both DNSKEY and CDNSKEY */
keytype = ki->rdata.type;
ki->rdata.type = dns_rdatatype_dnskey;
result = dns_ds_buildrdata(name, &ki->rdata, ds.digest_type,
dsbuf, &newdsrdata);
ki->rdata.type = keytype;
if (result != ISC_R_SUCCESS) {
vbprintf(3, "dns_ds_buildrdata("
"keytag=%d, algo=%d, digest=%d): %s\n",
@@ -548,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;
@@ -573,7 +552,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
ki->algo = dnskey.algorithm;
dns_rdata_toregion(keyrdata, &r);
ki->tag = dst_region_computeid(&r, ki->algo);
ki->tag = dst_region_computeid(&r);
ki->dst = NULL;
if (!match_key_dsset(ki, dsset, strictness)) {
@@ -619,19 +598,15 @@ free_keytable(keyinfo_t **keytable_p) {
* otherwise the key algorithm. This is used by the signature coverage
* check functions below.
*/
static uint8_t *
static dns_secalg_t *
matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
dns_rdataset_t *sigset)
{
isc_result_t result;
uint8_t *algo;
dns_secalg_t *algo;
int i;
algo = isc_mem_get(mctx, nkey);
if (algo == NULL) {
fatal("allocating RRSIG/DNSKEY match list: %s",
isc_result_totext(ISC_R_NOMEMORY));
}
memset(algo, 0, nkey);
for (result = dns_rdataset_first(sigset);
@@ -707,7 +682,7 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
* fetched from the child zone, any working signature is enough.
*/
static bool
signed_loose(uint8_t *algo) {
signed_loose(dns_secalg_t *algo) {
bool ok = false;
int i;
for (i = 0; i < nkey; i++) {
@@ -726,7 +701,7 @@ signed_loose(uint8_t *algo) {
* RRset.
*/
static bool
signed_strict(dns_rdataset_t *dsset, uint8_t *algo) {
signed_strict(dns_rdataset_t *dsset, dns_secalg_t *algo) {
isc_result_t result;
bool all_ok = true;
@@ -765,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);
@@ -826,7 +797,6 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
return (ISC_R_NOSPACE);
}
cdnskey->type = dns_rdatatype_dnskey;
rdata = rdata_get();
result = dns_ds_buildrdata(name, cdnskey, dtype[i],
r.base, rdata);
@@ -844,34 +814,6 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
return (ISC_R_SUCCESS);
}
/*
* For sorting the digest types so that DS records generated
* from CDNSKEY records are in canonical order.
*/
static int
cmp_dtype(const void *ap, const void *bp) {
int a = *(const uint8_t *)ap;
int b = *(const uint8_t *)bp;
return (a - b);
}
static void
add_dtype(const char *dn) {
uint8_t dt;
unsigned i, n;
dt = strtodsdigest(dn);
n = sizeof(dtype)/sizeof(dtype[0]);
for (i = 0; i < n; i++) {
if (dtype[i] == 0 || dtype[i] == dt) {
dtype[i] = dt;
qsort(dtype, i+1, 1, cmp_dtype);
return;
}
}
fatal("too many -a digest type arguments");
}
static void
make_new_ds_set(ds_maker_func_t *ds_from_rdata,
uint32_t ttl, dns_rdataset_t *rdset)
@@ -882,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;
@@ -942,7 +880,7 @@ consistent_digests(dns_rdataset_t *dsset) {
dns_rdata_t *arrdata;
dns_rdata_ds_t *ds;
dns_keytag_t key_tag;
uint8_t algorithm;
dns_secalg_t algorithm;
bool match;
int i, j, n, d;
@@ -954,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;
@@ -973,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);
@@ -1160,7 +1090,7 @@ main(int argc, char *argv[]) {
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
switch (ch) {
case 'a':
add_dtype(isc_commandline_argument);
add_dtype(strtodsdigest(isc_commandline_argument));
break;
case 'c':
rdclass = strtoclass(isc_commandline_argument);

View File

@@ -40,6 +40,7 @@
<copyright>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -143,9 +144,9 @@
record. This option has no effect when using CDS records.
</para>
<para>
The <replaceable>algorithm</replaceable> must be one of SHA-1
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
values are case insensitive. If no algorithm is specified,
The <replaceable>algorithm</replaceable> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
the default is SHA-256.
</para>
</listitem>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -129,9 +129,9 @@
record. This option has no effect when using CDS records.
</p>
<p>
The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
values are case insensitive. If no algorithm is specified,
The <em class="replaceable"><code>algorithm</code></em> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
the default is SHA-256.
</p>
</dd>

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2008-2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -10,12 +10,12 @@
.\" Title: dnssec-dsfromkey
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2012-05-02
.\" Date: 2019-05-08
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "DNSSEC\-DSFROMKEY" "8" "2012\-05\-02" "ISC" "BIND9"
.TH "DNSSEC\-DSFROMKEY" "8" "2019\-05\-08" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -39,61 +39,99 @@
dnssec-dsfromkey \- DNSSEC DS RR generation tool
.SH "SYNOPSIS"
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
\fBdnssec\-dsfromkey\fR [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] {keyfile}
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {keyfile}
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
\fBdnssec\-dsfromkey\fR {\-s} [\fB\-1\fR] [\fB\-2\fR] [\fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-s\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-f\ \fR\fB\fIfile\fR\fR] [\fB\-A\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {dnsname}
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-A\fR] {\fB\-f\ \fR\fB\fIfile\fR\fR} [dnsname]
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
\fBdnssec\-dsfromkey\fR [\fB\-h\fR] [\fB\-V\fR]
\fBdnssec\-dsfromkey\fR [\fB\-1\fR | \fB\-2\fR | \fB\-a\ \fR\fB\fIalg\fR\fR] [\fB\-C\fR | \fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-T\ \fR\fB\fITTL\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] {\-s} {dnsname}
.HP \w'\fBdnssec\-dsfromkey\fR\ 'u
\fBdnssec\-dsfromkey\fR [\fB\-h\fR | \fB\-V\fR]
.SH "DESCRIPTION"
.PP
The
\fBdnssec\-dsfromkey\fR
outputs the Delegation Signer (DS) resource record (RR), as defined in RFC 3658 and RFC 4509, for the given key(s)\&.
command outputs DS (Delegation Signer) resource records (RRs), or CDS (Child DS) RRs with the
\fB\-C\fR
option\&.
.PP
The input keys can be specified in a number of ways:
.PP
By default,
\fBdnssec\-dsfromkey\fR
reads a key file named like
Knnnn\&.+aaa+iiiii\&.key, as generated by
\fBdnssec\-keygen\fR\&.
.PP
With the
\fB\-f \fR\fB\fIfile\fR\fR
option,
\fBdnssec\-dsfromkey\fR
reads keys from a zone file or partial zone file (which can contain just the DNSKEY records)\&.
.PP
With the
\fB\-s\fR
option,
\fBdnssec\-dsfromkey\fR
reads a
keyset\-
file, as generated by
\fBdnssec\-keygen\fR\fB\-C\fR\&.
.SH "OPTIONS"
.PP
\-1
.RS 4
Use SHA\-1 as the digest algorithm (the default is to use both SHA\-1 and SHA\-256)\&.
An abbreviation for
\fB\-a SHA\-1\fR\&. (Note: The SHA\-1 algorithm is no longer recommended for use when generating new DS and CDS records\&.)
.RE
.PP
\-2
.RS 4
Use SHA\-256 as the digest algorithm\&.
An abbreviation for
\fB\-a SHA\-256\fR\&.
.RE
.PP
\-a \fIalgorithm\fR
.RS 4
Select the digest algorithm\&. The value of
\fBalgorithm\fR
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256) or SHA\-384 (SHA384)\&. These values are case insensitive\&.
Specify a digest algorithm to use when converting DNSKEY records to DS records\&. This option can be repeated, so that multiple DS records are created for each DNSKEY record\&.
.sp
The
\fIalgorithm\fR
must be one of SHA\-1, SHA\-256, or SHA\-384\&. These values are case insensitive, and the hyphen may be omitted\&. If no algorithm is specified, the default is SHA\-256\&. (Note: The SHA\-1 algorithm is no longer recommended for use when generating new DS and CDS records\&.)
.RE
.PP
\-A
.RS 4
Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in
\fB\-f\fR
zone file mode\&.
.RE
.PP
\-c \fIclass\fR
.RS 4
Specifies the DNS class (default is IN)\&. Useful only in
\fB\-s\fR
keyset or
\fB\-f\fR
zone file mode\&.
.RE
.PP
\-C
.RS 4
Generate CDS records rather than DS records\&. This is mutually exclusive with generating lookaside records\&.
.RE
.PP
\-T \fITTL\fR
.RS 4
Specifies the TTL of the DS records\&.
.RE
.PP
\-K \fIdirectory\fR
.RS 4
Look for key files (or, in keyset mode,
keyset\-
files) in
\fBdirectory\fR\&.
Generate CDS records rather than DS records\&.
.RE
.PP
\-f \fIfile\fR
.RS 4
Zone file mode: in place of the keyfile name, the argument is the DNS domain name of a zone master file, which can be read from
Zone file mode:
\fBdnssec\-dsfromkey\fR\*(Aqs final
\fIdnsname\fR
argument is the DNS domain name of a zone whose master file can be read from
\fBfile\fR\&. If the zone name is the same as
\fBfile\fR, then it may be omitted\&.
.sp
If
\fBfile\fR
is set to
\fIfile\fR
is
"\-", then the zone data is read from the standard input\&. This makes it possible to use the output of the
\fBdig\fR
command as input, as in:
@@ -101,26 +139,32 @@ command as input, as in:
\fBdig dnskey example\&.com | dnssec\-dsfromkey \-f \- example\&.com\fR
.RE
.PP
\-A
\-h
.RS 4
Include ZSKs when generating DS records\&. Without this option, only keys which have the KSK flag set will be converted to DS records and printed\&. Useful only in zone file mode\&.
Prints usage information\&.
.RE
.PP
\-l \fIdomain\fR
\-K \fIdirectory\fR
.RS 4
Generate a DLV set instead of a DS set\&. The specified
\fBdomain\fR
is appended to the name for each record in the set\&. The DNSSEC Lookaside Validation (DLV) RR is described in RFC 4431\&. This is mutually exclusive with generating CDS records\&.
Look for key files or
keyset\-
files in
\fBdirectory\fR\&.
.RE
.PP
\-s
.RS 4
Keyset mode: in place of the keyfile name, the argument is the DNS domain name of a keyset file\&.
Keyset mode:
\fBdnssec\-dsfromkey\fR\*(Aqs final
\fIdnsname\fR
argument is the DNS domain name used to locate a
keyset\-
file\&.
.RE
.PP
\-c \fIclass\fR
\-T \fITTL\fR
.RS 4
Specifies the DNS class (default is IN)\&. Useful only in keyset or zone file mode\&.
Specifies the TTL of the DS records\&. By default the TTL is omitted\&.
.RE
.PP
\-v \fIlevel\fR
@@ -128,11 +172,6 @@ Specifies the DNS class (default is IN)\&. Useful only in keyset or zone file mo
Sets the debugging level\&.
.RE
.PP
\-h
.RS 4
Prints usage information\&.
.RE
.PP
\-V
.RS 4
Prints version information\&.
@@ -141,16 +180,16 @@ Prints version information\&.
.PP
To build the SHA\-256 DS RR from the
\fBKexample\&.com\&.+003+26160\fR
keyfile name, the following command would be issued:
keyfile name, you can issue the following command:
.PP
\fBdnssec\-dsfromkey \-2 Kexample\&.com\&.+003+26160\fR
.PP
The command would print something like:
.PP
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94\fR
\fBexample\&.com\&. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94\fR
.SH "FILES"
.PP
The keyfile can be designed by the key identification
The keyfile can be designated by the key identification
Knnnn\&.+aaa+iiiii
or the full file name
Knnnn\&.+aaa+iiiii\&.key
@@ -170,13 +209,18 @@ A keyfile error can give a "file not found" even if the file exists\&.
\fBdnssec-keygen\fR(8),
\fBdnssec-signzone\fR(8),
BIND 9 Administrator Reference Manual,
RFC 3658,
RFC 4431\&.
RFC 4509\&.
RFC 3658
(DS RRs),
RFC 4509
(SHA\-256 for DS RRs),
RFC 6605
(SHA\-384 for DS RRs),
RFC 7344
(CDS and CDNSKEY RRs)\&.
.SH "AUTHOR"
.PP
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2008-2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -11,8 +11,6 @@
/*! \file */
#include <config.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -49,12 +47,7 @@
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-dsfromkey";
int verbose;
static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed;
@@ -215,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;
@@ -235,9 +227,7 @@ logkey(dns_rdata_t *rdata)
}
static void
emit(unsigned int dtype, 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];
@@ -261,7 +251,7 @@ emit(unsigned int dtype, bool showall, char *lookaside,
if ((dnskey.flags & DNS_KEYFLAG_KSK) == 0 && !showall)
return;
result = dns_ds_buildrdata(name, rdata, dtype, buf, &ds);
result = dns_ds_buildrdata(name, rdata, dt, buf, &ds);
if (result != ISC_R_SUCCESS)
fatal("can't build record");
@@ -269,18 +259,6 @@ emit(unsigned int dtype, 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);
@@ -300,48 +278,54 @@ emit(unsigned int dtype, 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, bool cds, dns_rdata_t *rdata) {
unsigned i, n;
n = sizeof(dtype)/sizeof(dtype[0]);
for (i = 0; i < n; i++) {
if (dtype[i] != 0) {
emit(dtype[i], showall, cds, rdata);
}
}
}
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
fprintf(stderr, "Usage:\n");
fprintf(stderr, " %s options [-K dir] keyfile\n\n", program);
fprintf(stderr, " %s options [-K dir] [-c class] -s dnsname\n\n",
program);
fprintf(stderr, " %s options -f zonefile (as zone name)\n\n", program);
fprintf(stderr, " %s options -f zonefile zonename\n\n", program);
fprintf(stderr, " %s [options] keyfile\n\n", program);
fprintf(stderr, " %s [options] -f zonefile [zonename]\n\n", program);
fprintf(stderr, " %s [options] -s dnsname\n\n", program);
fprintf(stderr, " %s [-h|-V]\n\n", program);
fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "Options:\n");
fprintf(stderr, " -v <verbose level>\n");
fprintf(stderr, " -V: print version information\n");
fprintf(stderr, " -K <directory>: directory in which to find "
"key file or keyset file\n");
fprintf(stderr, " -a algorithm: digest algorithm "
"(SHA-1, SHA-256, GOST or SHA-384)\n");
fprintf(stderr, " -1: use SHA-1\n");
fprintf(stderr, " -2: use SHA-256\n");
fprintf(stderr, " -C: print CDS record\n");
fprintf(stderr, " -l: add lookaside zone and print DLV records\n");
fprintf(stderr, " -s: read keyset from keyset-<dnsname> file\n");
fprintf(stderr, " -c class: rdata class for DS set (default: IN)\n");
fprintf(stderr, " -T TTL\n");
fprintf(stderr, " -f file: read keyset from zone file\n");
fprintf(stderr, " -A: when used with -f, "
"include all keys in DS set, not just KSKs\n");
fprintf(stderr, "Output: DS or DLV RRs\n");
fprintf(stderr, "Options:\n"
" -1: digest algorithm SHA-1\n"
" -2: digest algorithm SHA-256\n"
" -a algorithm: digest algorithm (SHA-1, SHA-256 or SHA-384)\n"
" -A: include all keys in DS set, not just KSKs (-f only)\n"
" -c class: rdata class for DS set (default IN) (-f or -s only)\n"
" -C: print CDS records\n"
" -f zonefile: read keys from a zone file\n"
" -h: print help information\n"
" -K directory: where to find key or keyset files\n"
" -s: read keys from keyset-<dnsname> file\n"
" -T: TTL of output records (omitted by default)\n"
" -v level: verbosity\n"
" -V: print version information\n");
fprintf(stderr, "Output: DS or CDS RRs\n");
exit (-1);
}
@@ -350,14 +334,11 @@ int
main(int argc, char **argv) {
char *classname = NULL;
char *filename = NULL, *dir = NULL, *namestr;
char *lookaside = NULL;
char *endp;
int ch;
unsigned int dtype = DNS_DSDIGEST_SHA1;
bool cds = false;
bool both = true;
bool usekeyset = false;
bool showall = false;
bool cds = false;
bool usekeyset = false;
bool showall = false;
isc_result_t result;
isc_log_t *log = NULL;
dns_rdataset_t rdataset;
@@ -365,12 +346,14 @@ main(int argc, char **argv) {
dns_rdata_init(&rdata);
if (argc == 1)
if (argc == 1) {
usage();
}
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
fatal("out of memory");
}
#if USE_PKCS11
pk11_result_register();
@@ -383,24 +366,18 @@ main(int argc, char **argv) {
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
switch (ch) {
case '1':
dtype = DNS_DSDIGEST_SHA1;
both = false;
add_dtype(DNS_DSDIGEST_SHA1);
break;
case '2':
dtype = DNS_DSDIGEST_SHA256;
both = false;
add_dtype(DNS_DSDIGEST_SHA256);
break;
case 'A':
showall = true;
break;
case 'a':
dtype = strtodsdigest(isc_commandline_argument);
both = false;
add_dtype(strtodsdigest(isc_commandline_argument));
break;
case 'C':
if (lookaside != NULL)
fatal("lookaside and CDS are mutually"
" exclusive");
cds = true;
break;
case 'c':
@@ -419,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;
@@ -463,22 +435,32 @@ main(int argc, char **argv) {
rdclass = strtoclass(classname);
if (usekeyset && filename != NULL)
if (usekeyset && filename != NULL) {
fatal("cannot use both -s and -f");
}
/* When not using -f, -A is implicit */
if (filename == NULL)
if (filename == NULL) {
showall = true;
}
if (argc < isc_commandline_index + 1 && filename == NULL)
/* Default digest type if none specified. */
if (dtype[0] == 0) {
dtype[0] = DNS_DSDIGEST_SHA256;
}
if (argc < isc_commandline_index + 1 && filename == NULL) {
fatal("the key file name was not specified");
if (argc > isc_commandline_index + 1)
}
if (argc > isc_commandline_index + 1) {
fatal("extraneous arguments");
}
result = dst_lib_init(mctx, NULL);
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
fatal("could not initialize dst: %s",
isc_result_totext(result));
}
setup_logging(mctx, &log);
@@ -488,38 +470,38 @@ main(int argc, char **argv) {
if (argc < isc_commandline_index + 1 && filename != NULL) {
/* using zone name as the zone file name */
namestr = filename;
} else
} else {
namestr = argv[isc_commandline_index];
}
result = initname(namestr);
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
fatal("could not initialize name %s", namestr);
}
if (usekeyset)
if (usekeyset) {
result = loadkeyset(dir, &rdataset);
else
} else {
result = loadset(filename, &rdataset);
}
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
fatal("could not load DNSKEY set: %s\n",
isc_result_totext(result));
}
for (result = dns_rdataset_first(&rdataset);
result == ISC_R_SUCCESS;
result = dns_rdataset_next(&rdataset)) {
result = dns_rdataset_next(&rdataset))
{
dns_rdata_init(&rdata);
dns_rdataset_current(&rdataset, &rdata);
if (verbose > 2)
if (verbose > 2) {
logkey(&rdata);
}
if (both) {
emit(DNS_DSDIGEST_SHA1, showall, lookaside,
cds, &rdata);
emit(DNS_DSDIGEST_SHA256, showall, lookaside,
cds, &rdata);
} else
emit(dtype, showall, lookaside, cds, &rdata);
emits(showall, cds, &rdata);
}
} else {
unsigned char key_buf[DST_KEY_MAXSIZE];
@@ -527,28 +509,25 @@ main(int argc, char **argv) {
loadkey(argv[isc_commandline_index], key_buf,
DST_KEY_MAXSIZE, &rdata);
if (both) {
emit(DNS_DSDIGEST_SHA1, showall, lookaside, cds,
&rdata);
emit(DNS_DSDIGEST_SHA256, showall, lookaside, cds,
&rdata);
} else
emit(dtype, showall, lookaside, cds, &rdata);
emits(showall, cds, &rdata);
}
if (dns_rdataset_isassociated(&rdataset))
if (dns_rdataset_isassociated(&rdataset)) {
dns_rdataset_disassociate(&rdataset);
}
cleanup_logging(&log);
dst_lib_destroy();
dns_name_destroy();
if (verbose > 10)
if (verbose > 10) {
isc_mem_stats(mctx, stdout);
}
isc_mem_destroy(&mctx);
fflush(stdout);
if (ferror(stdout)) {
fprintf(stderr, "write error\n");
return (1);
} else
} else {
return (0);
}
}

View File

@@ -12,7 +12,7 @@
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dnssec-dsfromkey">
<info>
<date>2012-05-02</date>
<date>2019-05-08</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
@@ -41,6 +41,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -48,56 +49,108 @@
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>dnssec-dsfromkey</command>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-1</option></arg>
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-C</option></arg>
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
<group choice="opt">
<arg choice="plain"><option>-1</option></arg>
<arg choice="plain"><option>-2</option></arg>
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
</group>
<group>
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
</group>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="req" rep="norepeat">keyfile</arg>
</cmdsynopsis>
<cmdsynopsis sepchar=" ">
<command>dnssec-dsfromkey</command>
<arg choice="req" rep="norepeat">-s</arg>
<arg choice="opt" rep="norepeat"><option>-1</option></arg>
<arg choice="opt" rep="norepeat"><option>-2</option></arg>
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-s</option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<group choice="opt">
<arg choice="plain"><option>-1</option></arg>
<arg choice="plain"><option>-2</option></arg>
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
</group>
<group>
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
</group>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="req" rep="norepeat">dnsname</arg>
</cmdsynopsis>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-A</option></arg>
<arg choice="req" rep="norepeat"><option>-f <replaceable class="parameter">file</replaceable></option></arg>
<arg choice="opt" rep="norepeat">dnsname</arg>
</cmdsynopsis>
<cmdsynopsis sepchar=" ">
<command>dnssec-dsfromkey</command>
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
<arg choice="opt" rep="norepeat"><option>-V</option></arg>
</cmdsynopsis>
<group choice="opt">
<arg choice="plain"><option>-1</option></arg>
<arg choice="plain"><option>-2</option></arg>
<arg choice="plain"><option>-a <replaceable class="parameter">alg</replaceable></option></arg>
</group>
<group>
<arg choice="plain" rep="norepeat"><option>-C</option></arg>
<arg choice="plain" rep="norepeat"><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
</group>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">TTL</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-K <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="req" rep="norepeat">-s</arg>
<arg choice="req" rep="norepeat">dnsname</arg>
</cmdsynopsis>
<cmdsynopsis sepchar=" ">
<command>dnssec-dsfromkey</command>
<group choice="opt">
<arg choice="plain" rep="norepeat"><option>-h</option></arg>
<arg choice="plain" rep="norepeat"><option>-V</option></arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsection><info><title>DESCRIPTION</title></info>
<para><command>dnssec-dsfromkey</command>
outputs the Delegation Signer (DS) resource record (RR), as defined in
RFC 3658 and RFC 4509, for the given key(s).
<para>
The <command>dnssec-dsfromkey</command> command outputs DS (Delegation
Signer) resource records (RRs), or CDS (Child DS) RRs with the
<option>-C</option> option.
</para>
<para>
The input keys can be specified in a number of ways:
</para>
<para>
By default, <command>dnssec-dsfromkey</command> reads a key file
named like <filename>Knnnn.+aaa+iiiii.key</filename>, as generated
by <command>dnssec-keygen</command>.
</para>
<para>
With the <option>-f <replaceable>file</replaceable></option>
option, <command>dnssec-dsfromkey</command> reads keys from a zone file
or partial zone file (which can contain just the DNSKEY records).
</para>
<para>
With the <option>-s</option>
option, <command>dnssec-dsfromkey</command> reads
a <filename>keyset-</filename> file, as generated
by <command>dnssec-keygen</command> <option>-C</option>.
</para>
</refsection>
<refsection><info><title>OPTIONS</title></info>
<variablelist>
<varlistentry>
<term>-1</term>
<listitem>
<para>
Use SHA-1 as the digest algorithm (the default is to use
both SHA-1 and SHA-256).
An abbreviation for <option>-a SHA-1</option>.
(Note: The SHA-1 algorithm is no longer recommended for use
when generating new DS and CDS records.)
</para>
</listitem>
</varlistentry>
@@ -106,7 +159,7 @@
<term>-2</term>
<listitem>
<para>
Use SHA-256 as the digest algorithm.
An abbreviation for <option>-a SHA-256</option>.
</para>
</listitem>
</varlistentry>
@@ -115,40 +168,49 @@
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
<listitem>
<para>
Select the digest algorithm. The value of
<option>algorithm</option> must be one of SHA-1 (SHA1),
SHA-256 (SHA256) or SHA-384 (SHA384).
These values are case insensitive.
Specify a digest algorithm to use when converting DNSKEY
records to DS records. This option can be repeated, so
that multiple DS records are created for each DNSKEY
record.
</para>
<para>
The <replaceable>algorithm</replaceable> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
the default is SHA-256.
(Note: The SHA-1 algorithm is no longer recommended for use
when generating new DS and CDS records.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-A</term>
<listitem>
<para>
Include ZSKs when generating DS records. Without this option, only
keys which have the KSK flag set will be converted to DS records
and printed. Useful only in <option>-f</option> zone file mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-c <replaceable class="parameter">class</replaceable></term>
<listitem>
<para>
Specifies the DNS class (default is IN). Useful only
in <option>-s</option> keyset or <option>-f</option>
zone file mode.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-C</term>
<listitem>
<para>
Generate CDS records rather than DS records. This is mutually
exclusive with generating lookaside records.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-T <replaceable class="parameter">TTL</replaceable></term>
<listitem>
<para>
Specifies the TTL of the DS records.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-K <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
Look for key files (or, in keyset mode,
<filename>keyset-</filename> files) in
<option>directory</option>.
Generate CDS records rather than DS records.
</para>
</listitem>
</varlistentry>
@@ -157,13 +219,14 @@
<term>-f <replaceable class="parameter">file</replaceable></term>
<listitem>
<para>
Zone file mode: in place of the keyfile name, the argument is
the DNS domain name of a zone master file, which can be read
Zone file mode: <command>dnssec-dsfromkey</command>'s
final <replaceable>dnsname</replaceable> argument is
the DNS domain name of a zone whose master file can be read
from <option>file</option>. If the zone name is the same as
<option>file</option>, then it may be omitted.
</para>
<para>
If <option>file</option> is set to <literal>"-"</literal>, then
If <replaceable>file</replaceable> is <literal>"-"</literal>, then
the zone data is read from the standard input. This makes it
possible to use the output of the <command>dig</command>
command as input, as in:
@@ -175,26 +238,20 @@
</varlistentry>
<varlistentry>
<term>-A</term>
<listitem>
<para>
Include ZSKs when generating DS records. Without this option,
only keys which have the KSK flag set will be converted to DS
records and printed. Useful only in zone file mode.
</para>
</listitem>
<term>-h</term>
<listitem>
<para>
Prints usage information.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-l <replaceable class="parameter">domain</replaceable></term>
<term>-K <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
Generate a DLV set instead of a DS set. The specified
<option>domain</option> is appended to the name for each
record in the set.
The DNSSEC Lookaside Validation (DLV) RR is described
in RFC 4431. This is mutually exclusive with generating
CDS records.
Look for key files or <filename>keyset-</filename> files in
<option>directory</option>.
</para>
</listitem>
</varlistentry>
@@ -203,18 +260,18 @@
<term>-s</term>
<listitem>
<para>
Keyset mode: in place of the keyfile name, the argument is
the DNS domain name of a keyset file.
Keyset mode: <command>dnssec-dsfromkey</command>'s
final <replaceable>dnsname</replaceable> argument is the DNS
domain name used to locate a <filename>keyset-</filename> file.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-c <replaceable class="parameter">class</replaceable></term>
<term>-T <replaceable class="parameter">TTL</replaceable></term>
<listitem>
<para>
Specifies the DNS class (default is IN). Useful only
in keyset or zone file mode.
Specifies the TTL of the DS records. By default the TTL is omitted.
</para>
</listitem>
</varlistentry>
@@ -228,15 +285,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Prints usage information.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-V</term>
<listitem>
@@ -253,21 +301,22 @@
<para>
To build the SHA-256 DS RR from the
<userinput>Kexample.com.+003+26160</userinput>
keyfile name, the following command would be issued:
keyfile name, you can issue the following command:
</para>
<para><userinput>dnssec-dsfromkey -2 Kexample.com.+003+26160</userinput>
</para>
<para>
The command would print something like:
</para>
<para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</userinput>
<para><userinput>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</userinput>
</para>
</refsection>
<refsection><info><title>FILES</title></info>
<para>
The keyfile can be designed by the key identification
The keyfile can be designated by the key identification
<filename>Knnnn.+aaa+iiiii</filename> or the full file name
<filename>Knnnn.+aaa+iiiii.key</filename> as generated by
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>.
@@ -295,9 +344,10 @@
<refentrytitle>dnssec-signzone</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
<citetitle>RFC 3658</citetitle>,
<citetitle>RFC 4431</citetitle>.
<citetitle>RFC 4509</citetitle>.
<citetitle>RFC 3658</citetitle> (DS RRs),
<citetitle>RFC 4509</citetitle> (SHA-256 for DS RRs),
<citetitle>RFC 6605</citetitle> (SHA-384 for DS RRs),
<citetitle>RFC 7344</citetitle> (CDS and CDNSKEY RRs).
</para>
</refsection>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2008-2012, 2014-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -33,105 +33,167 @@
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">dnssec-dsfromkey</code>
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-1</code>]
[<code class="option">-2</code>]
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
[<code class="option">-C</code>]
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
[
<code class="option">-1</code>
| <code class="option">-2</code>
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
]
[
<code class="option">-C</code>
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
]
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
{keyfile}
</p></div>
<div class="cmdsynopsis"><p>
<code class="command">dnssec-dsfromkey</code>
{-s}
[<code class="option">-1</code>]
[<code class="option">-2</code>]
[<code class="option">-a <em class="replaceable"><code>alg</code></em></code>]
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
[<code class="option">-l <em class="replaceable"><code>domain</code></em></code>]
[<code class="option">-s</code>]
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[
<code class="option">-1</code>
| <code class="option">-2</code>
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
]
[
<code class="option">-C</code>
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
]
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
[<code class="option">-f <em class="replaceable"><code>file</code></em></code>]
[<code class="option">-A</code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
{dnsname}
</p></div>
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-A</code>]
{<code class="option">-f <em class="replaceable"><code>file</code></em></code>}
[dnsname]
</p></div>
<div class="cmdsynopsis"><p>
<code class="command">dnssec-dsfromkey</code>
[<code class="option">-h</code>]
[<code class="option">-V</code>]
</p></div>
[
<code class="option">-1</code>
| <code class="option">-2</code>
| <code class="option">-a <em class="replaceable"><code>alg</code></em></code>
]
[
<code class="option">-C</code>
| <code class="option">-l <em class="replaceable"><code>domain</code></em></code>
]
[<code class="option">-T <em class="replaceable"><code>TTL</code></em></code>]
[<code class="option">-v <em class="replaceable"><code>level</code></em></code>]
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-K <em class="replaceable"><code>directory</code></em></code>]
{-s}
{dnsname}
</p></div>
<div class="cmdsynopsis"><p>
<code class="command">dnssec-dsfromkey</code>
[
<code class="option">-h</code>
| <code class="option">-V</code>
]
</p></div>
</div>
<div class="refsection">
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
<p><span class="command"><strong>dnssec-dsfromkey</strong></span>
outputs the Delegation Signer (DS) resource record (RR), as defined in
RFC 3658 and RFC 4509, for the given key(s).
<p>
The <span class="command"><strong>dnssec-dsfromkey</strong></span> command outputs DS (Delegation
Signer) resource records (RRs), or CDS (Child DS) RRs with the
<code class="option">-C</code> option.
</p>
<p>
The input keys can be specified in a number of ways:
</p>
<p>
By default, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads a key file
named like <code class="filename">Knnnn.+aaa+iiiii.key</code>, as generated
by <span class="command"><strong>dnssec-keygen</strong></span>.
</p>
<p>
With the <code class="option">-f <em class="replaceable"><code>file</code></em></code>
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads keys from a zone file
or partial zone file (which can contain just the DNSKEY records).
</p>
<p>
With the <code class="option">-s</code>
option, <span class="command"><strong>dnssec-dsfromkey</strong></span> reads
a <code class="filename">keyset-</code> file, as generated
by <span class="command"><strong>dnssec-keygen</strong></span> <code class="option">-C</code>.
</p>
</div>
<div class="refsection">
<a name="id-1.8"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term">-1</span></dt>
<dd>
<p>
Use SHA-1 as the digest algorithm (the default is to use
both SHA-1 and SHA-256).
An abbreviation for <code class="option">-a SHA-1</code>.
(Note: The SHA-1 algorithm is no longer recommended for use
when generating new DS and CDS records.)
</p>
</dd>
<dt><span class="term">-2</span></dt>
<dd>
<p>
Use SHA-256 as the digest algorithm.
An abbreviation for <code class="option">-a SHA-256</code>.
</p>
</dd>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
Select the digest algorithm. The value of
<code class="option">algorithm</code> must be one of SHA-1 (SHA1),
SHA-256 (SHA256) or SHA-384 (SHA384).
These values are case insensitive.
Specify a digest algorithm to use when converting DNSKEY
records to DS records. This option can be repeated, so
that multiple DS records are created for each DNSKEY
record.
</p>
<p>
The <em class="replaceable"><code>algorithm</code></em> must be one of
SHA-1, SHA-256, or SHA-384. These values are case insensitive,
and the hyphen may be omitted. If no algorithm is specified,
the default is SHA-256.
(Note: The SHA-1 algorithm is no longer recommended for use
when generating new DS and CDS records.)
</p>
</dd>
<dt><span class="term">-A</span></dt>
<dd>
<p>
Include ZSKs when generating DS records. Without this option, only
keys which have the KSK flag set will be converted to DS records
and printed. Useful only in <code class="option">-f</code> zone file mode.
</p>
</dd>
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
<dd>
<p>
Specifies the DNS class (default is IN). Useful only
in <code class="option">-s</code> keyset or <code class="option">-f</code>
zone file mode.
</p>
</dd>
<dt><span class="term">-C</span></dt>
<dd>
<p>
Generate CDS records rather than DS records. This is mutually
exclusive with generating lookaside records.
</p>
</dd>
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt>
<dd>
<p>
Specifies the TTL of the DS records.
</p>
</dd>
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
<dd>
<p>
Look for key files (or, in keyset mode,
<code class="filename">keyset-</code> files) in
<code class="option">directory</code>.
Generate CDS records rather than DS records.
</p>
</dd>
<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
<dd>
<p>
Zone file mode: in place of the keyfile name, the argument is
the DNS domain name of a zone master file, which can be read
Zone file mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s
final <em class="replaceable"><code>dnsname</code></em> argument is
the DNS domain name of a zone whose master file can be read
from <code class="option">file</code>. If the zone name is the same as
<code class="option">file</code>, then it may be omitted.
</p>
<p>
If <code class="option">file</code> is set to <code class="literal">"-"</code>, then
If <em class="replaceable"><code>file</code></em> is <code class="literal">"-"</code>, then
the zone data is read from the standard input. This makes it
possible to use the output of the <span class="command"><strong>dig</strong></span>
command as input, as in:
@@ -140,37 +202,31 @@
<strong class="userinput"><code>dig dnskey example.com | dnssec-dsfromkey -f - example.com</code></strong>
</p>
</dd>
<dt><span class="term">-A</span></dt>
<dd>
<p>
Include ZSKs when generating DS records. Without this option,
only keys which have the KSK flag set will be converted to DS
records and printed. Useful only in zone file mode.
</p>
</dd>
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
<dt><span class="term">-h</span></dt>
<dd>
<p>
Generate a DLV set instead of a DS set. The specified
<code class="option">domain</code> is appended to the name for each
record in the set.
The DNSSEC Lookaside Validation (DLV) RR is described
in RFC 4431. This is mutually exclusive with generating
CDS records.
Prints usage information.
</p>
</dd>
<dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
<dd>
<p>
Look for key files or <code class="filename">keyset-</code> files in
<code class="option">directory</code>.
</p>
</dd>
<dt><span class="term">-s</span></dt>
<dd>
<p>
Keyset mode: in place of the keyfile name, the argument is
the DNS domain name of a keyset file.
Keyset mode: <span class="command"><strong>dnssec-dsfromkey</strong></span>'s
final <em class="replaceable"><code>dnsname</code></em> argument is the DNS
domain name used to locate a <code class="filename">keyset-</code> file.
</p>
</dd>
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
<dt><span class="term">-T <em class="replaceable"><code>TTL</code></em></span></dt>
<dd>
<p>
Specifies the DNS class (default is IN). Useful only
in keyset or zone file mode.
Specifies the TTL of the DS records. By default the TTL is omitted.
</p>
</dd>
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
@@ -179,12 +235,6 @@
Sets the debugging level.
</p>
</dd>
<dt><span class="term">-h</span></dt>
<dd>
<p>
Prints usage information.
</p>
</dd>
<dt><span class="term">-V</span></dt>
<dd>
<p>
@@ -200,22 +250,23 @@
<p>
To build the SHA-256 DS RR from the
<strong class="userinput"><code>Kexample.com.+003+26160</code></strong>
keyfile name, the following command would be issued:
keyfile name, you can issue the following command:
</p>
<p><strong class="userinput"><code>dnssec-dsfromkey -2 Kexample.com.+003+26160</code></strong>
</p>
<p>
The command would print something like:
</p>
<p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0 C5EA0B94</code></strong>
<p><strong class="userinput"><code>example.com. IN DS 26160 5 2 3A1EADA7A74B8D0BA86726B0C227AA85AB8BBD2B2004F41A868A54F0C5EA0B94</code></strong>
</p>
</div>
<div class="refsection">
<a name="id-1.10"></a><h2>FILES</h2>
<p>
The keyfile can be designed by the key identification
The keyfile can be designated by the key identification
<code class="filename">Knnnn.+aaa+iiiii</code> or the full file name
<code class="filename">Knnnn.+aaa+iiiii.key</code> as generated by
<span class="refentrytitle">dnssec-keygen</span>(8).
@@ -245,9 +296,10 @@
<span class="refentrytitle">dnssec-signzone</span>(8)
</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 3658</em>,
<em class="citetitle">RFC 4431</em>.
<em class="citetitle">RFC 4509</em>.
<em class="citetitle">RFC 3658</em> (DS RRs),
<em class="citetitle">RFC 4509</em> (SHA-256 for DS RRs),
<em class="citetitle">RFC 6605</em> (SHA-384 for DS RRs),
<em class="citetitle">RFC 7344</em> (CDS and CDNSKEY RRs).
</p>
</div>

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2013-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -134,5 +134,5 @@ RFC 5011\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2013-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -11,8 +11,6 @@
/*! \file */
#include <config.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -48,12 +46,7 @@
#include "dnssectool.h"
#ifndef PATH_MAX
#define PATH_MAX 1024 /* WIN32, and others don't define this. */
#endif
const char *program = "dnssec-importkey";
int verbose;
static dns_rdataclass_t rdclass;
static dns_fixedname_t fixed;

View File

@@ -38,6 +38,7 @@
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2013-2016, 2018, 2019 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this

View File

@@ -1,4 +1,4 @@
.\" Copyright (C) 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2008-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -55,7 +55,7 @@ of the key is specified on the command line\&. This must match the name of the z
.RS 4
Selects the cryptographic algorithm\&. The value of
\fBalgorithm\fR
must be one of RSAMD5, RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
must be one of RSASHA1, NSEC3RSASHA1, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
.sp
If no algorithm is specified, then RSASHA1 will be used by default, unless the
\fB\-3\fR
@@ -307,5 +307,5 @@ The PKCS#11 URI Scheme (draft\-pechanec\-pkcs11uri\-13)\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2008-2012, 2014-2019 Internet Systems Consortium, Inc. ("ISC")
.br

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