ipreg/bind9.git
3 months agoMerge branch 'ondrej/disable-maintainer-mode-in-ci' into 'main' main
Ondřej Surý [Mon, 22 Jun 2020 17:01:41 +0000 (17:01 +0000)]
Merge branch 'ondrej/disable-maintainer-mode-in-ci' into 'main'

Disable rebuilding miscellaneous documentation source files when not in maintainer mode

See merge request isc-projects/bind9!3733

3 months agoEnable maintainer mode by default only when building from git 3733/head
Ondřej Surý [Mon, 22 Jun 2020 12:26:07 +0000 (14:26 +0200)]
Enable maintainer mode by default only when building from git

When maintainer mode is enabled (./configure --enable-maintainer-mode)
it enables rebuild of documentation source files that require extra
tools to be installed or compiled.  For a convenience, those files are
already committed into the repository and their rebuild is not required
to build BIND 9 from sources.

3 months agoRemove the last bits of '// not configured' from doc/misc/options
Ondřej Surý [Mon, 22 Jun 2020 11:58:19 +0000 (13:58 +0200)]
Remove the last bits of '// not configured' from doc/misc/options

3 months agoUpdate pregenerated dig.1in and rndc-confgen.8in
Ondřej Surý [Mon, 22 Jun 2020 11:48:39 +0000 (13:48 +0200)]
Update pregenerated dig.1in and rndc-confgen.8in

3 months agoDisable the double configure and build step in docs CI job
Ondřej Surý [Mon, 22 Jun 2020 11:13:11 +0000 (13:13 +0200)]
Disable the double configure and build step in docs CI job

The documentation now can be build even when the BIND 9 source tree
hasn't been built yet allowing no-arch builds.

3 months agoRebuild the manpages sources only when in maintainer mode
Ondřej Surý [Mon, 22 Jun 2020 11:08:58 +0000 (13:08 +0200)]
Rebuild the manpages sources only when in maintainer mode

Similarly, the manpage sources will get rebuild only when in maintainer
mode because they require sphinx-build to be available locally and that
might not be always the case.

3 months agoRebuild the file in doc/misc only when in maintainer mode
Ondřej Surý [Mon, 22 Jun 2020 11:03:07 +0000 (13:03 +0200)]
Rebuild the file in doc/misc only when in maintainer mode

The files in doc/misc requires all the BIND 9 libraries to be built
before the documentation can be built.  One of the extra automake
features is maintainer mode that allows to conditionally build and clean
files that require special tools.  Make use of the automake maintainer
mode to not rebuild the files in doc/misc under normal circumstances.

3 months agoMerge branch 'each-shorten-tests' into 'main'
Ondřej Surý [Mon, 22 Jun 2020 12:06:10 +0000 (12:06 +0000)]
Merge branch 'each-shorten-tests' into 'main'

reorder system tests to shorten runtime

See merge request isc-projects/bind9!3727

3 months agoreorder system tests to shorten runtime 3727/head
Evan Hunt [Sat, 20 Jun 2020 22:39:43 +0000 (15:39 -0700)]
reorder system tests to shorten runtime

if tests that take a particularly long time to complete
(serve-stale, dnssec, rpzrecurse) are run first, a parallel
run of the system tests can finish 1-2 minutes faster.

3 months agoMerge branch '1898-doc/misc/options-should-be-independent-on-configure' into 'main'
Ondřej Surý [Mon, 22 Jun 2020 11:44:39 +0000 (11:44 +0000)]
Merge branch '1898-doc/misc/options-should-be-independent-on-configure' into 'main'

Remove // not configured when generating doc/misc/options

Closes #1898

See merge request isc-projects/bind9!3731

3 months agoRemove // not configured when generating doc/misc/options 3731/head
Ondřej Surý [Mon, 22 Jun 2020 10:41:01 +0000 (12:41 +0200)]
Remove // not configured when generating doc/misc/options

The doc/misc/options is used to generate a file describing all
configuration options. Currently, the file contents could differ
based on ./configure option which is kind of suboptimal.

We already removed the "// not configured" from the options.active, and
this time we remove generation of the string altogether.

3 months agoMerge branch '1949-checknames' into 'main'
Ondřej Surý [Mon, 22 Jun 2020 11:14:54 +0000 (11:14 +0000)]
Merge branch '1949-checknames' into 'main'

"check-names primary" and "check-names secondary" were ignored

Closes #1949

See merge request isc-projects/bind9!3702

3 months agoAdd CHANGES and release note for #1949 3702/head
Ondřej Surý [Mon, 22 Jun 2020 10:33:54 +0000 (12:33 +0200)]
Add CHANGES and release note for #1949

3 months ago"check-names primary" and "check-names secondary" were ignored
Evan Hunt [Wed, 17 Jun 2020 00:48:42 +0000 (17:48 -0700)]
"check-names primary" and "check-names secondary" were ignored

these keywords were added to the parser as synonyms for "master"
and "slave" but were never hooked in to the configuration of named,
so they were ignored. this has been fixed and the option is now
checked for correctness.

3 months agoMerge branch '1627-address-race-in-zone-maintenance' into 'main'
Ondřej Surý [Mon, 22 Jun 2020 10:26:29 +0000 (10:26 +0000)]
Merge branch '1627-address-race-in-zone-maintenance' into 'main'

address race between zone_maintenance and dns_zone_setview_helper

Closes #1627

See merge request isc-projects/bind9!3669

3 months agoAddress race between zone_maintenance and dns_zone_setview_helper 3669/head
Mark Andrews [Thu, 27 Feb 2020 06:29:32 +0000 (17:29 +1100)]
Address race between zone_maintenance and dns_zone_setview_helper

There was a possible NULL dereference due to data race between accessing
zone->view and zone->view->adb.

3 months agoMerge branch 'each-rndc-netmgr-pt1' into 'main'
Evan Hunt [Fri, 19 Jun 2020 22:19:10 +0000 (22:19 +0000)]
Merge branch 'each-rndc-netmgr-pt1' into 'main'

client-side TCP

Closes #1958

See merge request isc-projects/bind9!3723

3 months agoCHANGES 3723/head
Evan Hunt [Wed, 10 Jun 2020 00:53:38 +0000 (17:53 -0700)]
CHANGES

3 months agochange the signature of recv callbacks to include a result code
Evan Hunt [Thu, 16 Apr 2020 02:26:49 +0000 (19:26 -0700)]
change the signature of recv callbacks to include a result code

this will allow recv event handlers to distinguish between cases
in which the region is NULL because of error, shutdown, or cancelation.

3 months agoimplement isc_nm_cancelread()
Evan Hunt [Sat, 6 Jun 2020 00:32:36 +0000 (17:32 -0700)]
implement isc_nm_cancelread()

The isc_nm_cancelread() function cancels reading on a connected
socket and calls its read callback function with a 'result'
parameter of ISC_R_CANCELED.

3 months agoshorten the sleep in isc_nm_destroy()
Evan Hunt [Fri, 10 Apr 2020 23:59:24 +0000 (16:59 -0700)]
shorten the sleep in isc_nm_destroy()

when isc_nm_destroy() is called, there's a loop that waits for
other references to be detached, pausing and unpausing the netmgr
to ensure that all the workers' events are run, followed by a
1-second sleep. this caused a delay on shutdown which will be
noticeable when netmgr is used in tools other than named itself,
so the delay has now been reduced to a hundredth of a second.

3 months agoimplement isc_nm_tcpconnect()
Evan Hunt [Tue, 17 Dec 2019 02:24:55 +0000 (18:24 -0800)]
implement isc_nm_tcpconnect()

the isc_nm_tcpconnect() function establishes a client connection via
TCP.  once the connection is esablished, a callback function will be
called with a newly created network manager handle.

3 months agoallow tcpdns sockets to self-reference while connected
Witold Kręcicki [Wed, 10 Jun 2020 00:07:16 +0000 (17:07 -0700)]
allow tcpdns sockets to self-reference while connected

A TCPDNS socket creates a handle for each complete DNS message.

Previously, when all the handles were disconnected, the socket
would be closed, but the wrapped TCP socket might still have
more to read.

Now, when a connection is established, the TCPDNS socket creates
a reference to itself by attaching itself to sock->self. This
reference isn't cleared until the connection is closed via
EOF, timeout, or server shutdown. This allows the socket to remain
open even when there are no active handles for it.

3 months agomodify reference counting within netmgr
Evan Hunt [Fri, 5 Jun 2020 06:13:54 +0000 (23:13 -0700)]
modify reference counting within netmgr

- isc__nmhandle_get() now attaches to the sock in the nmhandle object.
  the caller is responsible for dereferencing the original socket
  pointer when necessary.
- tcpdns listener sockets attach sock->outer to the outer tcp listener
  socket. tcpdns connected sockets attach sock->outerhandle to the handle
  for the tcp connected socket.
- only listener sockets need to be attached/detached directly. connected
  sockets should only be accessed and reference-counted via their
  associated handles.

3 months agomake isc_nmsocket_{attach,detach}{} functions private
Evan Hunt [Thu, 4 Jun 2020 21:54:36 +0000 (14:54 -0700)]
make isc_nmsocket_{attach,detach}{} functions private

there is no need for a caller to reference-count socket objects.
they need tto be able tto close listener sockets (i.e., those
returned by isc_nm_listen{udp,tcp,tcpdns}), and an isc_nmsocket_close()
function has been added for that. other sockets are only accessed via
handles.

3 months agoMerge branch 'marka-placeholder' into 'main'
Mark Andrews [Fri, 19 Jun 2020 02:20:25 +0000 (02:20 +0000)]
Merge branch 'marka-placeholder' into 'main'

placeholder for [GL #1955]

See merge request isc-projects/bind9!3720

3 months agoplaceholder for [GL #1955] 3720/head
Mark Andrews [Fri, 19 Jun 2020 02:16:57 +0000 (12:16 +1000)]
placeholder for [GL #1955]

3 months agoMerge branch 'michal/fix-abi-check-job-in-gitlab-ci' into 'main'
Michał Kępień [Thu, 18 Jun 2020 08:56:01 +0000 (08:56 +0000)]
Merge branch 'michal/fix-abi-check-job-in-gitlab-ci' into 'main'

Fix ABI check job in GitLab CI

See merge request isc-projects/bind9!3715

3 months agoFix ABI check job in GitLab CI 3715/head
Michał Kępień [Thu, 18 Jun 2020 08:52:54 +0000 (10:52 +0200)]
Fix ABI check job in GitLab CI

Since the reference BIND version for the ABI check job which is run for
the main branch is now 9.17.2, autoreconf needs to be run before
./configure as the latter is no longer present in the Git repository.

3 months agoMerge branch 'v9_17_2-release' into 'main'
Michał Kępień [Thu, 18 Jun 2020 08:20:56 +0000 (08:20 +0000)]
Merge branch 'v9_17_2-release' into 'main'

[CVE-2020-8618] [CVE-2020-8619] Merge 9.17.2 release branch

See merge request isc-projects/bind9!3711

3 months agoSet up release notes for BIND 9.17.3 3711/head
Michał Kępień [Thu, 18 Jun 2020 08:10:02 +0000 (10:10 +0200)]
Set up release notes for BIND 9.17.3

3 months agoBump BIND_BASELINE_VERSION for ABI checks
Michał Kępień [Thu, 18 Jun 2020 08:10:02 +0000 (10:10 +0200)]
Bump BIND_BASELINE_VERSION for ABI checks

3 months agoMerge branch 'prep-release' into master
Evan Hunt [Wed, 10 Jun 2020 21:10:33 +0000 (14:10 -0700)]
Merge branch 'prep-release' into master

3 months agoUpdate BIND version to 9.17.2
Michał Kępień [Wed, 10 Jun 2020 09:26:35 +0000 (11:26 +0200)]
Update BIND version to 9.17.2

3 months agoAdd a CHANGES marker
Michał Kępień [Wed, 10 Jun 2020 09:26:35 +0000 (11:26 +0200)]
Add a CHANGES marker

3 months agoMerge branch 'security-master-docs' into 'security-master'
Michał Kępień [Wed, 10 Jun 2020 09:21:13 +0000 (09:21 +0000)]
Merge branch 'security-master-docs' into 'security-master'

Prepare documentation for BIND 9.17.2

See merge request isc-private/bind9!172

3 months agoUpdate library API versions
Michał Kępień [Wed, 10 Jun 2020 09:26:35 +0000 (11:26 +0200)]
Update library API versions

3 months agoTweak and reword release notes
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Tweak and reword release notes

3 months agoAdd release note for #1859
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Add release note for #1859

3 months agoAdd release note for #1842
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Add release note for #1842

3 months agoAdd release note for #1834
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Add release note for #1834

3 months agoAdd release note for #1812
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Add release note for #1812

3 months agoAdd release note for #1714
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Add release note for #1714

3 months agoAdd release note for #83
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Add release note for #83

3 months agoReorder release notes
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Reorder release notes

3 months agoMerge branch 'security-wildcard-test-marka' into security-master
Michał Kępień [Tue, 9 Jun 2020 14:24:23 +0000 (16:24 +0200)]
Merge branch 'security-wildcard-test-marka' into security-master

3 months agoPrepare release notes for BIND 9.17.2
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Prepare release notes for BIND 9.17.2

3 months agoMerge branch 'security-new_reference-insist' into security-master
Michał Kępień [Tue, 9 Jun 2020 14:24:23 +0000 (16:24 +0200)]
Merge branch 'security-new_reference-insist' into security-master

3 months agoAdd CHANGES note
Mark Andrews [Tue, 2 Jun 2020 05:06:43 +0000 (15:06 +1000)]
Add CHANGES note

3 months agoTweak and reword recent CHANGES entries
Michał Kępień [Wed, 10 Jun 2020 09:07:02 +0000 (11:07 +0200)]
Tweak and reword recent CHANGES entries

3 months agoMerge branch '1850-cleanup-client_allocsendbuf' into security-master
Michał Kępień [Tue, 9 Jun 2020 14:24:23 +0000 (16:24 +0200)]
Merge branch '1850-cleanup-client_allocsendbuf' into security-master

3 months agoAdd CHANGES entry for #1718
Mark Andrews [Tue, 2 Jun 2020 03:50:10 +0000 (13:50 +1000)]
Add CHANGES entry for #1718

3 months agoAdd checking RFC 4592 responses examples to wildcard system test
Mark Andrews [Tue, 2 Jun 2020 02:38:40 +0000 (12:38 +1000)]
Add checking RFC 4592 responses examples to wildcard system test

3 months agoAdd release note for #1718
Mark Andrews [Tue, 2 Jun 2020 05:11:05 +0000 (15:11 +1000)]
Add release note for #1718

3 months agoRemove INSIST from from new_reference
Mark Andrews [Tue, 2 Jun 2020 02:38:40 +0000 (12:38 +1000)]
Remove INSIST from from new_reference

RBTDB node can now appear on the deadnodes lists following the changes
to decrement_reference in 176b23b6cd98e5b58f832902fdbe964ee5f762d0 to
defer checking of node->down when the tree write lock is not held.  The
node should be unlinked instead.

3 months agoAdd release notes for #1850
Mark Andrews [Fri, 5 Jun 2020 03:08:40 +0000 (13:08 +1000)]
Add release notes for #1850

3 months agoAdd CHANGES entry for #1850
Mark Andrews [Thu, 28 May 2020 05:28:24 +0000 (15:28 +1000)]
Add CHANGES entry for #1850

3 months agoAdjust NS_CLIENT_TCP_BUFFER_SIZE and cleanup client_allocsendbuf
Mark Andrews [Thu, 28 May 2020 05:19:25 +0000 (15:19 +1000)]
Adjust NS_CLIENT_TCP_BUFFER_SIZE and cleanup client_allocsendbuf

NS_CLIENT_TCP_BUFFER_SIZE was 2 byte too large following the
move to netmgr add associated changes to lib/ns/client.c and
as a result an INSIST could be trigger if the DNS message being
constructed had a checkpoint stage that fell in those two extra
bytes.  Adjusted NS_CLIENT_TCP_BUFFER_SIZE and cleaned up
client_allocsendbuf now that the previously reserved 2 bytes
are no longer used.

3 months agoMerge branch 'ondrej/switch-the-default-branch-name-to-main' into 'main'
Ondřej Surý [Wed, 17 Jun 2020 12:12:07 +0000 (12:12 +0000)]
Merge branch 'ondrej/switch-the-default-branch-name-to-main' into 'main'

Adjust the GitLab CI scripts for new default branch name

See merge request isc-projects/bind9!3706

3 months agoAdjust the GitLab CI scripts for new default branch name 3706/head
Ondřej Surý [Wed, 17 Jun 2020 11:33:31 +0000 (13:33 +0200)]
Adjust the GitLab CI scripts for new default branch name

3 months agoMerge branch '1950-placeholder' into 'master'
Ondřej Surý [Wed, 17 Jun 2020 10:40:25 +0000 (10:40 +0000)]
Merge branch '1950-placeholder' into 'master'

Add CHANGES placeholder for #1950

Closes #1950

See merge request isc-projects/bind9!3705

3 months agoAdd CHANGES placeholder for #1950 3705/head
Ondřej Surý [Wed, 17 Jun 2020 10:39:05 +0000 (12:39 +0200)]
Add CHANGES placeholder for #1950

3 months agoMerge branch '1943-remove-references-to-blacklist-and-whitelist-in-bind-arm' into...
Ondřej Surý [Tue, 16 Jun 2020 19:57:41 +0000 (19:57 +0000)]
Merge branch '1943-remove-references-to-blacklist-and-whitelist-in-bind-arm' into 'master'

Resolve "Remove references to "blacklist" and "whitelist" in BIND ARM"

Closes #1943

See merge request isc-projects/bind9!3693

3 months agoUpdate logging-categories.rst and reference.rst 3693/head
Suzanne Goldlust [Mon, 15 Jun 2020 17:01:37 +0000 (17:01 +0000)]
Update logging-categories.rst and reference.rst
Remove references to "blacklist" and "whitelist"

3 months agoMerge branch '1932-text-corrections-in-readme-md' into 'master'
Ondřej Surý [Tue, 16 Jun 2020 19:35:44 +0000 (19:35 +0000)]
Merge branch '1932-text-corrections-in-readme-md' into 'master'

Resolve "Text corrections in README.md"

Closes #1932

See merge request isc-projects/bind9!3686

3 months agoVarious text edits and corrections to README.md
Suzanne Goldlust [Tue, 16 Jun 2020 19:35:44 +0000 (19:35 +0000)]
Various text edits and corrections to README.md

3 months agoMerge branch '1931-fix-out-of-order-rfcs-in-general-rst-file-of-bind-arm' into 'master'
Ondřej Surý [Tue, 16 Jun 2020 19:30:44 +0000 (19:30 +0000)]
Merge branch '1931-fix-out-of-order-rfcs-in-general-rst-file-of-bind-arm' into 'master'

Resolve "Fix out-of-order RFCs in general.rst file of BIND ARM"

Closes #1931

See merge request isc-projects/bind9!3685

3 months agoFix two RFCs that were out of numerical order 3685/head
Suzanne Goldlust [Wed, 10 Jun 2020 19:15:52 +0000 (19:15 +0000)]
Fix two RFCs that were out of numerical order

3 months agoMerge branch '1945-system-clang-tsan-has-bad-symbolizer' into 'master'
Ondřej Surý [Tue, 16 Jun 2020 08:49:08 +0000 (08:49 +0000)]
Merge branch '1945-system-clang-tsan-has-bad-symbolizer' into 'master'

Set the TSAN symbolizer path directly, the indirection via env doesn't work

Closes #1945

See merge request isc-projects/bind9!3696

3 months agoSet the TSAN symbolizer path directly, the indirection via env doesn't work 3696/head
Ondřej Surý [Tue, 16 Jun 2020 07:58:49 +0000 (09:58 +0200)]
Set the TSAN symbolizer path directly, the indirection via env doesn't work

3 months agoMerge branch '1474-threadsanitizer-data-race-lib-dns-message-c' into 'master'
Ondřej Surý [Tue, 16 Jun 2020 06:57:21 +0000 (06:57 +0000)]
Merge branch '1474-threadsanitizer-data-race-lib-dns-message-c' into 'master'

Add missing acquire memory barrier in isc_nmhandle_unref

Closes #1474

See merge request isc-projects/bind9!3689

3 months agoAdd missing acquire memory barrier in isc_nmhandle_unref 3689/head
Ondřej Surý [Thu, 11 Jun 2020 11:01:26 +0000 (13:01 +0200)]
Add missing acquire memory barrier in isc_nmhandle_unref

The ThreadSanitizer uses system synchronization primitives to check for
data race.  The netmgr handle->references was missing acquire memory
barrier before resetting and reusing the memory occupied by isc_nmhandle_t.

3 months agoMerge branch 'marka-dsset-refs' into 'master'
Mark Andrews [Thu, 11 Jun 2020 06:07:21 +0000 (06:07 +0000)]
Merge branch 'marka-dsset-refs' into 'master'

The dsset returned by dns_keynode_dsset() was not thread safe

Closes #1926

See merge request isc-projects/bind9!3687

3 months agoAdd release note for [GL #1926] 3687/head
Mark Andrews [Thu, 11 Jun 2020 03:10:10 +0000 (13:10 +1000)]
Add release note for [GL #1926]

3 months agoAdd CHANGES note [GL #1926]
Mark Andrews [Thu, 11 Jun 2020 03:08:07 +0000 (13:08 +1000)]
Add CHANGES note [GL #1926]

3 months agoval->keynode is no longer needed
Mark Andrews [Thu, 11 Jun 2020 05:01:12 +0000 (15:01 +1000)]
val->keynode is no longer needed

3 months agoThe dsset returned by dns_keynode_dsset needs to be thread safe.
Mark Andrews [Wed, 10 Jun 2020 07:07:52 +0000 (17:07 +1000)]
The dsset returned by dns_keynode_dsset needs to be thread safe.

- clone keynode->dsset rather than return a pointer so that thread
  use is independent of each other.
- hold a reference to the dsset (keynode) so it can't be deleted
  while in use.
- create a new keynode when removing DS records so that dangling
  pointers to the deleted records will not occur.
- use a rwlock when accessing the rdatalist to prevent instabilities
  when DS records are added.

3 months agoMerge branch '1930-tcp-race-quota' into 'master'
Evan Hunt [Wed, 10 Jun 2020 18:49:33 +0000 (18:49 +0000)]
Merge branch '1930-tcp-race-quota' into 'master'

Fix a race in TCP accepting.

Closes #1930

See merge request isc-projects/bind9!3683

3 months agoFix a race in TCP accepting. 3683/head
Witold Kręcicki [Wed, 10 Jun 2020 14:19:16 +0000 (16:19 +0200)]
Fix a race in TCP accepting.

There's a possibility of a race in TCP accepting code:
T1 accepts a connection C1
T2 accepts a connection C2
T1 tries to accept a connection C3, but we hit a quota,
   isc_quota_cb_init() sets quota_accept_cb for the socket,
   we return from accept_connection
T2 drops C2, but we race in quota_release with accepting C3 so
   we don't see quota->waiting is > 0, we don't launch the callback
T1 accepts a connection C4, we are able to get the quota we clear
   the quota_accept_cb from sock->quotacb
T1 drops C1, tries to call the callback which is zeroed, sigsegv.

3 months agoDon't clean quota cb cb_func/data, we don't own it
Witold Kręcicki [Wed, 10 Jun 2020 15:51:27 +0000 (17:51 +0200)]
Don't clean quota cb cb_func/data, we don't own it

3 months agoMerge branch '1867-fix-system-tests-on-windows' into 'master'
Michał Kępień [Tue, 9 Jun 2020 13:38:39 +0000 (13:38 +0000)]
Merge branch '1867-fix-system-tests-on-windows' into 'master'

Fix system tests on Windows

Closes #1867

See merge request isc-projects/bind9!3680

3 months agoDisable temporarily unsupported tests on Windows 3680/head
Michał Kępień [Tue, 9 Jun 2020 13:35:54 +0000 (15:35 +0200)]
Disable temporarily unsupported tests on Windows

Due to the changes introduced by the Automake migration, system tests
requiring Python (chain, pipelined, qmin, tcp), dynamic loading of
shared objects (dlzexternal, dyndb, filter-aaaa), or LMDB (nzd2nzf)
currently do not work on Windows.  Temporarily disable them on that
platform by moving them from the PARALLEL_COMMON list to the
PARALLEL_UNIX list until the situation is rectified.

3 months agoFix SYSTEMTESTTOP on Windows
Michał Kępień [Tue, 9 Jun 2020 13:35:54 +0000 (15:35 +0200)]
Fix SYSTEMTESTTOP on Windows

Without SYSTEMTESTTOP=.. lines in tests.sh scripts, SYSTEMTESTTOP is
being set to an absolute path.  On Windows, this means that an absolute
Cygwin path gets passed as a command line argument to native Windows
binaries, which cannot work and causes system tests to break.  Fix by
passing SYSTEMTESTTOP through cygpath on Windows, which causes that
variable to be set to an absolute "mixed mode" path (Windows path with
forward slashes).

3 months agoMerge branch '1921-gitlab-ci-release-process-fixes' into 'master'
Michał Kępień [Tue, 9 Jun 2020 12:51:05 +0000 (12:51 +0000)]
Merge branch '1921-gitlab-ci-release-process-fixes' into 'master'

GitLab CI release process fixes

Closes #1921

See merge request isc-projects/bind9!3670

3 months agoRestore GitLab CI job building release tarballs 3670/head
Michał Kępień [Tue, 9 Jun 2020 12:47:06 +0000 (14:47 +0200)]
Restore GitLab CI job building release tarballs

With "make dist" producing usable source tarballs and documentation
building working again, restore the script which allows a release
tarball to be built by a GitLab CI job, only making minimal adjustments
required due to the changes in the documentation building process and
due to dropping the "version" file.

3 months agoMake Sphinx output document naming consistent
Michał Kępień [Tue, 9 Jun 2020 12:47:06 +0000 (14:47 +0200)]
Make Sphinx output document naming consistent

Ensure the name of the EPUB file produced by Sphinx is consistent with
the name of its PDF counterpart by adjusting Sphinx configuration.

3 months agoFix respdiff job in GitLab CI
Michał Kępień [Tue, 9 Jun 2020 12:47:06 +0000 (14:47 +0200)]
Fix respdiff job in GitLab CI

As the "configure" script is no longer stored in the Git repository, run
"autoreconf -fi" at the beginning of the respdiff job in GitLab CI in
order to enable that job to work properly.

3 months agoFix source tarball creation job in GitLab CI
Michał Kępień [Tue, 9 Jun 2020 12:47:06 +0000 (14:47 +0200)]
Fix source tarball creation job in GitLab CI

For the time being, "make all" needs to be run before "make dist" can
succeed as parts of the documentation are generated by programs compiled
during the regular build process.

As only one source tarball is published for each BIND release, make sure
the tarball creation job in GitLab CI only contains one tarball in the
desired format among its artifacts.

Drop the TARBALL_COMPRESSOR .gitlab-ci.yml variable as it is no longer
used in the source tarball creation process.

3 months agoRevise "srcid" file handling
Michał Kępień [Tue, 9 Jun 2020 12:47:06 +0000 (14:47 +0200)]
Revise "srcid" file handling

The "srcid" file present in each BIND source tarball contains a
shortened hash of the Git commit corresponding to a given BIND release.
This allows a Git reference to be included in an archive that otherwise
lacks any Git information.

Before the move to Automake, if an "srcid" file was present in the root
source directory at the time ./configure was run, its contents were used
as the value of a compile-time constant which was then baked into BIND
binaries; otherwise, "git rev-parse" was used to determine the value of
that constant.

With Automake, a similar approach was attempted that required the
"srcid" file to be present at autoreconf time in order for it to be
used.  However, note that this means that even if that file is present
in a source tarball created using "make dist", its contents are not
going to influence the value of the aforementioned compile-time constant
because autoreconf hardcodes the output of "git rev-parse" into the
configure script at autoreconf time.

To make things more clear, always use "git rev-parse" for determining
the value of the PACKAGE_SRCID compile-time constant when running
autoreconf.  This causes "srcid" to be an empty string in source
tarballs built from other source tarballs, but that is not deemed to be
much of an issue as "make dist" is expected to be run from Git
repository clones.  Remove stderr redirections to /dev/null to ensure
errors caused e.g. by running "make dist" from outside a Git repository
clone are not hidden.  Trim the Git commit hash to 7 characters for
consistency between Unix and Windows systems.

Despite the above, ensure the "srcid" file is present in source tarballs
created using "make dist" as that file is used by the build process on
Windows.

3 months agoMerge branch '1808-race-in-resolver-fetch-fix-restore-client' into 'master'
Ondřej Surý [Sat, 6 Jun 2020 05:02:12 +0000 (05:02 +0000)]
Merge branch '1808-race-in-resolver-fetch-fix-restore-client' into 'master'

ensure fctx->clientstr is null-terminated

Closes #1808

See merge request isc-projects/bind9!3675

3 months agoensure clientstr is null-terminated 3675/head
Evan Hunt [Sat, 6 Jun 2020 01:55:22 +0000 (18:55 -0700)]
ensure clientstr is null-terminated

3 months agoMerge branch '1842-correct-the-bind-arm-to-say-that-the-default-session-key-for-use...
Ondřej Surý [Fri, 5 Jun 2020 14:35:05 +0000 (14:35 +0000)]
Merge branch '1842-correct-the-bind-arm-to-say-that-the-default-session-key-for-use-with-update-policy-local-is' into 'master'

Resolve "Correct the BIND ARM to say that the default session-key for use with 'update-policy local;' is generated at startup"

Closes #1842

See merge request isc-projects/bind9!3664

3 months agoEdit reference.rst to indicate that the TSIG 3664/head
Suzanne Goldlust [Thu, 4 Jun 2020 18:06:11 +0000 (18:06 +0000)]
Edit reference.rst to indicate that the TSIG
session key is automatically created on startup

3 months agoMerge branch '1808-race-in-resolver-fetch' into 'master'
Ondřej Surý [Fri, 5 Jun 2020 14:21:12 +0000 (14:21 +0000)]
Merge branch '1808-race-in-resolver-fetch' into 'master'

Fix a data access race in resolver.

Closes #1912 and #1808

See merge request isc-projects/bind9!3575

3 months agoAdd release note for #1808 3575/head
Ondřej Surý [Fri, 5 Jun 2020 10:08:13 +0000 (12:08 +0200)]
Add release note for #1808

3 months agoAdd CHANGES entry for #1808
Witold Kręcicki [Thu, 21 May 2020 12:31:09 +0000 (14:31 +0200)]
Add CHANGES entry for #1808

3 months agoFix a data access race in resolver
Witold Kręcicki [Thu, 21 May 2020 12:31:09 +0000 (14:31 +0200)]
Fix a data access race in resolver

We were passing client address to dns_resolver_createfetch as a pointer
and it was saved as a pointer. The client (with its address) could be
gone before the fetch is finished, and in a very odd scenario
log_formerr would call isc_sockaddr_format() which first checks if the
address family is valid (and at this point it still is), then the
sockaddr is cleared, and then isc_netaddr_fromsockaddr is called which
fails an assertion as the address family is now invalid.

3 months agoMerge branch 'mnowak/1769-ensure-all-necessary-files-are-included-in-the-tarball...
Michał Kępień [Fri, 5 Jun 2020 11:48:55 +0000 (11:48 +0000)]
Merge branch 'mnowak/1769-ensure-all-necessary-files-are-included-in-the-tarball-produced-by-make-dist' into 'master'

Fix 'make dist'

Closes #1769

See merge request isc-projects/bind9!3527

3 months agoFix "make dist" 3527/head
Michal Nowak [Thu, 4 Jun 2020 17:02:27 +0000 (19:02 +0200)]
Fix "make dist"

Make various adjustments necessary to enable "make dist" to build a BIND
source tarball whose contents are complete enough to build binaries, run
unit & system tests, and generate documentation on Unix systems.

Known outstanding issues:

  - "make distcheck" does not work yet.
  - Tests do not work for out-of-tree source-tarball-based builds.
  - Source tarballs are not complete enough for building on Windows.

All of the above will be addressed in due course.

3 months agoGet rid of "helper" *.c files
Michal Nowak [Thu, 4 Jun 2020 16:53:47 +0000 (18:53 +0200)]
Get rid of "helper" *.c files

Merge lib/isc/unix/ifiter_getifaddrs.c into lib/isc/unix/interfaceiter.c
and lib/isc/xoshiro128starstar.c into lib/isc/random.c.  This avoids the
need for extra Automake directives required to process the "helper" *.c
files properly and makes the code more localized.