]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
6 years agoremove remaining DLV-related configuration checks
Evan Hunt [Wed, 7 Aug 2019 18:53:13 +0000 (11:53 -0700)] 
remove remaining DLV-related configuration checks

6 years agoupdate docbook grammar, removing dnssec-looksaide
Evan Hunt [Wed, 7 Aug 2019 17:31:19 +0000 (10:31 -0700)] 
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.

6 years agomark 'dnssec-lookaside' obsolete in parser
Evan Hunt [Wed, 7 Aug 2019 16:13:33 +0000 (09:13 -0700)] 
mark 'dnssec-lookaside' obsolete in parser

6 years agoremove DLV system tests
Evan Hunt [Tue, 6 Aug 2019 16:28:14 +0000 (09:28 -0700)] 
remove DLV system tests

6 years agoremove DLV support from dnssec-signzone
Evan Hunt [Wed, 7 Aug 2019 19:37:09 +0000 (12:37 -0700)] 
remove DLV support from dnssec-signzone

6 years agoremove DLV support from dnssec-dsfromkey
Evan Hunt [Wed, 7 Aug 2019 19:27:03 +0000 (12:27 -0700)] 
remove DLV support from dnssec-dsfromkey

6 years agoremove DLV support from dnssec-checkds
Evan Hunt [Wed, 7 Aug 2019 19:19:19 +0000 (12:19 -0700)] 
remove DLV support from dnssec-checkds

6 years agoremove DLV from dns_client API and lib/samples
Evan Hunt [Wed, 7 Aug 2019 18:51:13 +0000 (11:51 -0700)] 
remove DLV from dns_client API and lib/samples

6 years agoremove DLV from delv
Evan Hunt [Tue, 6 Aug 2019 16:34:27 +0000 (09:34 -0700)] 
remove DLV from delv

6 years agoremove DLV-related library code
Evan Hunt [Wed, 7 Aug 2019 18:53:11 +0000 (11:53 -0700)] 
remove DLV-related library code

6 years agoremove DLV from validator
Evan Hunt [Tue, 6 Aug 2019 16:28:05 +0000 (09:28 -0700)] 
remove DLV from validator

6 years agoMerge branch '1182-add-older-autoconf-pkg-config-compat-macros' into 'master'
Ondřej Surý [Thu, 8 Aug 2019 12:46:52 +0000 (08:46 -0400)] 
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

6 years agoAdd PKG_CHECK_VAR and AS_VAR_COPY compat macros (Courtesy of ycflash)
Ondřej Surý [Thu, 8 Aug 2019 12:11:35 +0000 (14:11 +0200)] 
Add PKG_CHECK_VAR and AS_VAR_COPY compat macros (Courtesy of ycflash)

6 years agoMerge branch 'michal/implement-a-convenience-function-for-rndc-dumpdb' into 'master'
Michał Kępień [Thu, 8 Aug 2019 12:42:49 +0000 (08:42 -0400)] 
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

6 years agoUse rndc_dumpdb() in the "sfcache" system test
Michał Kępień [Thu, 8 Aug 2019 12:27:55 +0000 (14:27 +0200)] 
Use rndc_dumpdb() in the "sfcache" system test

6 years agoUse rndc_dumpdb() in the "serve-stale" system test
Michał Kępień [Thu, 8 Aug 2019 12:27:55 +0000 (14:27 +0200)] 
Use rndc_dumpdb() in the "serve-stale" system test

6 years agoUse rndc_dumpdb() in the "rndc" system test
Michał Kępień [Thu, 8 Aug 2019 12:27:55 +0000 (14:27 +0200)] 
Use rndc_dumpdb() in the "rndc" system test

6 years agoUse rndc_dumpdb() in the "dnssec" system test
Michał Kępień [Thu, 8 Aug 2019 12:27:55 +0000 (14:27 +0200)] 
Use rndc_dumpdb() in the "dnssec" system test

6 years agoUse rndc_dumpdb() in the "cookie" system test
Michał Kępień [Thu, 8 Aug 2019 12:27:55 +0000 (14:27 +0200)] 
Use rndc_dumpdb() in the "cookie" system test

6 years agoUse rndc_dumpdb() in the "cacheclean" system test
Michał Kępień [Thu, 8 Aug 2019 12:27:55 +0000 (14:27 +0200)] 
Use rndc_dumpdb() in the "cacheclean" system test

6 years agoImplement a convenience function for "rndc dumpdb"
Michał Kępień [Thu, 8 Aug 2019 12:27:55 +0000 (14:27 +0200)] 
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.

6 years agoMerge branch 'sparc-pause' into 'master'
Ondřej Surý [Thu, 8 Aug 2019 11:31:29 +0000 (07:31 -0400)] 
Merge branch 'sparc-pause' into 'master'

configure.ac: autodetect 'pause' instruction presence on sparc

See merge request isc-projects/bind9!2243

6 years agoconfigure.ac: autodetect 'pause' instruction presence on sparc
Sergei Trofimovich [Thu, 8 Aug 2019 07:33:10 +0000 (08:33 +0100)] 
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>
6 years agoMerge branch 'each-mdig-multi-norrcomments' into 'master'
Evan Hunt [Thu, 8 Aug 2019 03:15:13 +0000 (23:15 -0400)] 
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

6 years agoadded "mdig +multi +norrcomment" test; also fixed the flawed dig test
Evan Hunt [Tue, 6 Aug 2019 04:24:06 +0000 (21:24 -0700)] 
added "mdig +multi +norrcomment" test; also fixed the flawed dig test

6 years agominor bugfix in mdig: when using +multi, +norrcomments was ignored
Evan Hunt [Tue, 30 Jul 2019 19:28:20 +0000 (12:28 -0700)] 
minor bugfix in mdig: when using +multi, +norrcomments was ignored

6 years agoMerge branch '1148-deadlock-hangs-named-v9_11-v9_14-master' into 'master'
Ondřej Surý [Wed, 7 Aug 2019 11:02:16 +0000 (07:02 -0400)] 
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

6 years agoHave the dns_client hold a .references until all external references are removed
Ondřej Surý [Tue, 6 Aug 2019 15:35:20 +0000 (17:35 +0200)] 
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 e80c4c3431504a462ce03bffbb9229b9b34395d1)
(cherry picked from commit ebc48cda26ff3935406f48bb745561cc00fed046)

6 years agoHave the view hold a weakref until all external references are removed
Mark Andrews [Tue, 6 Aug 2019 02:40:04 +0000 (12:40 +1000)] 
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 be8af3afb711a04ac140b1debce3b950922d714f)
(cherry picked from commit e3946327035832ec03c064410e5c6881841f8f6f)

6 years agolib/dns/resolver.c: Convert (dns_view_t *)->weakrefs to isc_refcount_t
Ondřej Surý [Thu, 1 Aug 2019 09:42:58 +0000 (11:42 +0200)] 
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 a7c9a52c89146490a0e797df2119026a268f294c)
(cherry picked from commit 232140edae6b80f8344db234cda28f8456269a6e)

6 years agoMerge branch 'ondrej/flycheck-configuration-update' into 'master'
Ondřej Surý [Wed, 7 Aug 2019 08:13:18 +0000 (04:13 -0400)] 
Merge branch 'ondrej/flycheck-configuration-update' into 'master'

Update the flycheck configuration for gcc and cppcheck

See merge request isc-projects/bind9!2234

6 years agoUpdate the flycheck configuration for gcc and cppcheck
Ondřej Surý [Wed, 7 Aug 2019 08:12:25 +0000 (10:12 +0200)] 
Update the flycheck configuration for gcc and cppcheck

6 years agoMerge branch '1170-dig-comments' into 'master'
Evan Hunt [Tue, 6 Aug 2019 04:55:46 +0000 (00:55 -0400)] 
Merge branch '1170-dig-comments' into 'master'

Resolve "dig +nocomment still comments"

Closes #1170

See merge request isc-projects/bind9!2207

6 years agoclarify descriptions of comment-related options in dig usage and man page
Evan Hunt [Mon, 29 Jul 2019 23:32:00 +0000 (16:32 -0700)] 
clarify descriptions of comment-related options in dig usage and man page

6 years agoalways check 'printcmd' before printing cmdline message
Evan Hunt [Mon, 29 Jul 2019 23:06:59 +0000 (16:06 -0700)] 
always check 'printcmd' before printing cmdline message

6 years agoMerge branch '964-use-referral-ds-record-when-validating' into 'master'
Mark Andrews [Fri, 2 Aug 2019 05:31:16 +0000 (01:31 -0400)] 
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

6 years agoadd CHANGES
Mark Andrews [Wed, 31 Jul 2019 07:03:37 +0000 (17:03 +1000)] 
add CHANGES

6 years agocheck that example/DS is not fetched when validating a.example
Mark Andrews [Mon, 3 Jun 2019 01:44:18 +0000 (11:44 +1000)] 
check that example/DS is not fetched when validating a.example

6 years agoStore the DS and RRSIG(DS) with trust dns_trust_pending_answer
Mark Andrews [Wed, 27 Mar 2019 13:48:03 +0000 (00:48 +1100)] 
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.

6 years agoMerge branch '1175-a-race-in-ht-c-can-cause-require-failures' into 'master'
Mark Andrews [Thu, 1 Aug 2019 06:04:32 +0000 (02:04 -0400)] 
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

6 years agoadd CHANGES
Mark Andrews [Thu, 1 Aug 2019 06:03:55 +0000 (16:03 +1000)] 
add CHANGES

6 years agoremove invalid comment
Mark Andrews [Thu, 1 Aug 2019 01:32:28 +0000 (11:32 +1000)] 
remove invalid comment

6 years agokeep rpzs around until everything referencing it has gone
Mark Andrews [Thu, 1 Aug 2019 01:15:05 +0000 (11:15 +1000)] 
keep rpzs around until everything referencing it has gone

6 years agomaintain a reference to 'rpz' when calling rpz.c:update_quantum
Mark Andrews [Wed, 31 Jul 2019 23:30:49 +0000 (09:30 +1000)] 
maintain a reference to 'rpz' when calling rpz.c:update_quantum

6 years agoMerge branch 'michal/do-not-use-target-specific-variables-in-makefiles' into 'master'
Ondřej Surý [Wed, 31 Jul 2019 14:48:46 +0000 (10:48 -0400)] 
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

6 years agoFix the ${WRAP} -> $${WRAP} to allow static non-libtool linking again
Ondřej Surý [Wed, 31 Jul 2019 14:09:43 +0000 (16:09 +0200)] 
Fix the ${WRAP} -> $${WRAP} to allow static non-libtool linking again

6 years agoRevert the target specific variable to fix building with BSD make
Ondřej Surý [Wed, 31 Jul 2019 14:05:02 +0000 (16:05 +0200)] 
Revert the target specific variable to fix building with BSD make

6 years agoMerge branch '4-remove-etags' into 'master'
Ondřej Surý [Wed, 31 Jul 2019 13:43:42 +0000 (09:43 -0400)] 
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

6 years agoRemove the autoconf checks for etags/ctags and `make tags` target
Ondřej Surý [Wed, 31 Jul 2019 13:27:27 +0000 (15:27 +0200)] 
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.

6 years agoMerge branch '4-configure.ac-use-pkg-config-for-zlib' into 'master'
Ondřej Surý [Wed, 31 Jul 2019 13:15:12 +0000 (09:15 -0400)] 
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

6 years agoConvert the configure.ac rules for zlib library to use pkg-config
Ondřej Surý [Wed, 31 Jul 2019 11:50:15 +0000 (13:50 +0200)] 
Convert the configure.ac rules for zlib library to use pkg-config

6 years agoMerge branch '1159-bits-65-72-of-the-dns64-prefix-are-supposed-to-be-zero' into ...
Mark Andrews [Wed, 31 Jul 2019 12:11:45 +0000 (08:11 -0400)] 
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

6 years agoadd CHANGES
Mark Andrews [Wed, 31 Jul 2019 07:08:55 +0000 (17:08 +1000)] 
add CHANGES

6 years agocheck that bits 64..71 in a dns64 prefix are zero
Mark Andrews [Tue, 23 Jul 2019 18:53:13 +0000 (04:53 +1000)] 
check that bits 64..71 in a dns64 prefix are zero

6 years agoMerge branch 'ondrej/cleanup-isc_thread-api' into 'master'
Ondřej Surý [Wed, 31 Jul 2019 10:09:45 +0000 (06:09 -0400)] 
Merge branch 'ondrej/cleanup-isc_thread-api' into 'master'

Cleanup the isc_thread API

See merge request isc-projects/bind9!2159

6 years agoMake isc_thread_join() assert internally on failure
Ondřej Surý [Thu, 18 Jul 2019 15:47:40 +0000 (17:47 +0200)] 
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.

6 years agoMake isc_thread_create() assert internally on failure
Ondřej Surý [Thu, 18 Jul 2019 15:24:05 +0000 (17:24 +0200)] 
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.

6 years agoMerge branch 'michal/wildcard-system-test-make-root-hints-consistent-with-authoritati...
Michał Kępień [Wed, 31 Jul 2019 09:43:17 +0000 (05:43 -0400)] 
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

6 years agoMake root hints consistent with authoritative data
Michał Kępień [Wed, 31 Jul 2019 09:06:34 +0000 (11:06 +0200)] 
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.

6 years agoMerge branch '1123-remove-isc-config.sh' into 'master'
Ondřej Surý [Wed, 31 Jul 2019 09:04:00 +0000 (05:04 -0400)] 
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

6 years agoThe BIND 9 libraries are now internal-only, so remove isc-config.sh
Ondřej Surý [Wed, 26 Jun 2019 08:21:49 +0000 (10:21 +0200)] 
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.

6 years agoMerge branch '1160-properly-use-isc_mem_putanddetach' into 'master'
Ondřej Surý [Wed, 31 Jul 2019 08:39:40 +0000 (04:39 -0400)] 
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

6 years agoWe need to wrap isc__mem_putanddetach in tkey_test.c unit too now
Ondřej Surý [Thu, 25 Jul 2019 19:36:35 +0000 (21:36 +0200)] 
We need to wrap isc__mem_putanddetach in tkey_test.c unit too now

6 years agoReplace usage of isc_mem_put+isc_mem_detach with isc_mem_putanddetach
Ondřej Surý [Tue, 23 Jul 2019 21:16:57 +0000 (17:16 -0400)] 
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().

6 years agoAdd spatch to replace isc_mem_put+isc_mem_detach with isc_mem_putanddetach
Ondřej Surý [Tue, 23 Jul 2019 21:28:02 +0000 (17:28 -0400)] 
Add spatch to replace isc_mem_put+isc_mem_detach with isc_mem_putanddetach

6 years agoMerge branch '1151-inconsistent-usage-of-stdout-vs-stderr-in-signing-tools' into...
Ondřej Surý [Wed, 31 Jul 2019 08:24:50 +0000 (04:24 -0400)] 
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

6 years agoAdd CHANGES and release note
Ondřej Surý [Sun, 21 Jul 2019 12:18:56 +0000 (08:18 -0400)] 
Add CHANGES and release note

6 years agoadd -q to getopt flags, and use newlines consistently with report()
Evan Hunt [Tue, 30 Jul 2019 15:43:30 +0000 (08:43 -0700)] 
add -q to getopt flags, and use newlines consistently with report()

6 years agodocument `-q` option in dnssec-signzone and dnssec-verify man pages
Evan Hunt [Tue, 30 Jul 2019 15:43:12 +0000 (08:43 -0700)] 
document `-q` option in dnssec-signzone and dnssec-verify man pages

6 years agoAdd -q (quiet) option to dnssec-signzone and dnssec-verify tool
Ondřej Surý [Mon, 22 Jul 2019 14:33:17 +0000 (10:33 -0400)] 
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.

6 years agoRemove 2>&1 from the dnssec-signzone invocation in tests
Ondřej Surý [Sat, 20 Jul 2019 22:06:16 +0000 (18:06 -0400)] 
Remove 2>&1 from the dnssec-signzone invocation in tests

6 years agoChange the zoneverify.c to print the information to user supplied function
Ondřej Surý [Sun, 21 Jul 2019 12:07:20 +0000 (08:07 -0400)] 
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.

6 years agoUse stdout to print information about signing
Ondřej Surý [Sun, 21 Jul 2019 11:36:13 +0000 (07:36 -0400)] 
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().

6 years agoMerge branch 'michal/staticstub-system-test-make-root-hints-consistent-with-authorita...
Michał Kępień [Wed, 31 Jul 2019 07:42:41 +0000 (03:42 -0400)] 
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

6 years agoMake root hints consistent with authoritative data
Michał Kępień [Wed, 31 Jul 2019 07:18:02 +0000 (09:18 +0200)] 
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.

6 years agoMerge branch 'michal/update-gitlab-ci-to-fedora-30' into 'master'
Michał Kępień [Wed, 31 Jul 2019 07:14:25 +0000 (03:14 -0400)] 
Merge branch 'michal/update-gitlab-ci-to-fedora-30' into 'master'

Update GitLab CI to Fedora 30

See merge request isc-projects/bind9!2196

6 years agoUpdate GitLab CI to Fedora 30
Michał Kępień [Wed, 31 Jul 2019 06:47:02 +0000 (08:47 +0200)] 
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.

6 years agoMerge branch '1152-dig-expandaaaa-doesn-t-work-with-short' into 'master'
Mark Andrews [Wed, 31 Jul 2019 01:40:49 +0000 (21:40 -0400)] 
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

6 years agoadd CHANGES
Mark Andrews [Wed, 31 Jul 2019 01:09:08 +0000 (11:09 +1000)] 
add CHANGES

6 years agocheck that dig +short +expandaaaa works
Mark Andrews [Sun, 21 Jul 2019 19:06:48 +0000 (05:06 +1000)] 
check that dig +short +expandaaaa works

6 years agoset DNS_STYLEFLAG_EXPANDAAAA flag in say_message if appropriate
Mark Andrews [Sun, 21 Jul 2019 19:03:15 +0000 (05:03 +1000)] 
set DNS_STYLEFLAG_EXPANDAAAA flag in say_message if appropriate

6 years agoMerge branch '1133-your-problem-or-cygwin-s' into 'master'
Mark Andrews [Wed, 31 Jul 2019 00:58:36 +0000 (20:58 -0400)] 
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

6 years agoadd CHANGES
Mark Andrews [Mon, 8 Jul 2019 01:34:22 +0000 (11:34 +1000)] 
add CHANGES

6 years agohandle connect() returning ETIMEDOUT on a non-blocking socket
Mark Andrews [Mon, 8 Jul 2019 01:32:20 +0000 (11:32 +1000)] 
handle connect() returning ETIMEDOUT on a non-blocking socket

6 years agoMerge branch '1171-alpine-linux-tweaks' into 'master'
Michał Kępień [Tue, 30 Jul 2019 20:49:15 +0000 (16:49 -0400)] 
Merge branch '1171-alpine-linux-tweaks' into 'master'

Alpine Linux tweaks

Closes #1171

See merge request isc-projects/bind9!2204

6 years agoAdd Alpine Linux to GitLab CI
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoDo not use legacy time zone names
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoFix awk invocation in the "verify" system test
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoExtend prerequisites for the "xfer" system test
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoMake "digdelv" system test work with BusyBox sed
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoMake "autosign" system test work with BusyBox awk
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoTweak buffer sizes to prevent compilation warnings
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoAlways include <errno.h> instead of <sys/errno.h>
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoUnify header ordering in unit tests
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoInclude <sched.h> where necessary for musl libc
Michał Kępień [Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)] 
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.

6 years agoMerge branch 'michal/filter-aaaa-system-test-make-root-hints-consistent-with-authorit...
Michał Kępień [Mon, 29 Jul 2019 20:10:44 +0000 (16:10 -0400)] 
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

6 years agoMake root hints consistent with authoritative data
Michał Kępień [Mon, 29 Jul 2019 19:44:31 +0000 (21:44 +0200)] 
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.

6 years agoMerge branch 'placeholder' into 'master'
Evan Hunt [Fri, 26 Jul 2019 02:05:03 +0000 (22:05 -0400)] 
Merge branch 'placeholder' into 'master'

placeholder

See merge request isc-projects/bind9!2202

6 years agoplaceholder
Evan Hunt [Fri, 26 Jul 2019 02:04:29 +0000 (22:04 -0400)] 
placeholder

6 years agoMerge branch '1030-statistics-channel-improvements-generated-files' into 'master'
Ondřej Surý [Fri, 26 Jul 2019 01:43:52 +0000 (21:43 -0400)] 
Merge branch '1030-statistics-channel-improvements-generated-files' into 'master'

Regenerate bind9.xsl.h

Closes #1030

See merge request isc-projects/bind9!2201