]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
4 years agoUpdate the copyright information in all files in the repository
Ondřej Surý [Thu, 3 Jun 2021 06:37:05 +0000 (08:37 +0200)] 
Update the copyright information in all files in the repository

This commit converts the license handling to adhere to the REUSE
specification.  It specifically:

1. Adds used licnses to LICENSES/ directory

2. Add "isc" template for adding the copyright boilerplate

3. Changes all source files to include copyright and SPDX license
   header, this includes all the C sources, documentation, zone files,
   configuration files.  There are notes in the doc/dev/copyrights file
   on how to add correct headers to the new files.

4. Handle the rest that can't be modified via .reuse/dep5 file.  The
   binary (or otherwise unmodifiable) files could have license places
   next to them in <foo>.license file, but this would lead to cluttered
   repository and most of the files handled in the .reuse/dep5 file are
   system test files.

4 years agoAdd reuse lint CI job
Ondřej Surý [Thu, 3 Jun 2021 08:58:56 +0000 (10:58 +0200)] 
Add reuse lint CI job

Instead of checking for the licenses in the misc step, add a separate
job that uses the upstream provided image that has reuse tool installed
and run `reuse lint` from the separate job.

4 years agoRemove the copyright handling via util/copyrights
Ondřej Surý [Thu, 3 Jun 2021 06:33:39 +0000 (08:33 +0200)] 
Remove the copyright handling via util/copyrights

The copyright handling has been long obsolete, the works is covered as
whole by the COPYING/LICENSE file even if a specific file doesn't have
a copyright header.

The important thing to remember here is that any work is covered by a
copyright law and by explicitly giving it license we provide extra
rights to the users of the works.

4 years agoMerge branch '3025-document-how-rate-limiting-uses-dns-cookies' into 'main'
Mark Andrews [Fri, 7 Jan 2022 08:24:09 +0000 (08:24 +0000)] 
Merge branch '3025-document-how-rate-limiting-uses-dns-cookies' into 'main'

Document how rate limiting uses DNS cookies

Closes #3025

See merge request isc-projects/bind9!5700

4 years agoDocument the interation of DNS COOKIE and RRL
Björn Persson [Fri, 7 Jan 2022 02:08:14 +0000 (13:08 +1100)] 
Document the interation of DNS COOKIE and RRL

Send back BADCOOKIE responses instead of TC=1 when slipping.

Skip rate limiting for UDP requests with valid server cookies.

4 years agoMerge branch '3079-always-enqueue-isc__nm_tcp_resumeread' into 'main'
Ondřej Surý [Thu, 6 Jan 2022 19:10:48 +0000 (19:10 +0000)] 
Merge branch '3079-always-enqueue-isc__nm_tcp_resumeread' into 'main'

Always enqueue isc__nm_tcp_resumeread()

Closes #3079

See merge request isc-projects/bind9!5695

4 years agoAdd CHANGES and release note for [GL #3079]
Ondřej Surý [Thu, 6 Jan 2022 12:14:55 +0000 (13:14 +0100)] 
Add CHANGES and release note for [GL #3079]

4 years agoAlways enqueue isc__nm_tcp_resumeread()
Ondřej Surý [Thu, 6 Jan 2022 12:03:39 +0000 (13:03 +0100)] 
Always enqueue isc__nm_tcp_resumeread()

The isc__nm_tcp_resumeread() was using maybe_enqueue function to enqueue
netmgr event which could case the read callback to be executed
immediately if there was enough data waiting in the TCP queue.

If such thing would happen, the read callback would be called before the
previous read callback was finished and the worker receive buffer would
be still marked "in use" causing a assertion failure.

This would affect only raw TCP channels, e.g. rndc and http statistics.

4 years agoMerge branch 'vicky-main-patch-33672' into 'main'
Petr Špaček [Thu, 6 Jan 2022 15:19:04 +0000 (15:19 +0000)] 
Merge branch 'vicky-main-patch-33672' into 'main'

Update preface.rst of DNSSEC Guide with new contact info for Josh Kuo

See merge request isc-projects/bind9!5696

4 years agoUpdate preface.rst of DNSSEC Guide with new contact info for Josh Kuo
Vicky Risk [Thu, 6 Jan 2022 14:54:40 +0000 (14:54 +0000)] 
Update preface.rst of DNSSEC Guide with new contact info for Josh Kuo

4 years agoMerge branch '3035-dnssec-policy-stops-signing-when-removing-zsk' into 'main'
Matthijs Mekking [Thu, 6 Jan 2022 08:51:54 +0000 (08:51 +0000)] 
Merge branch '3035-dnssec-policy-stops-signing-when-removing-zsk' into 'main'

Fix autosign system test, allow expired zone signatures to be replaced with KSK RRSIGs

Closes #3049 and #3035

See merge request isc-projects/bind9!5617

4 years agoReplace RSASHA1 in autosign test with default alg
Matthijs Mekking [Wed, 5 Jan 2022 10:39:03 +0000 (11:39 +0100)] 
Replace RSASHA1 in autosign test with default alg

Change RSASHA1 to $DEFAULT_ALGORITHM to be FIPS compliant.

There is one RSASHA1 occurence left, to test that dynamically adding an
NSEC3PARAM record to an NSEC-only zone fails.

4 years agoAdd CHANGES and release note for GL #3049
Matthijs Mekking [Tue, 7 Dec 2021 13:26:05 +0000 (14:26 +0100)] 
Add CHANGES and release note for GL #3049

This is a bugfix worth mentioning.

4 years agoUpdate autosign test
Matthijs Mekking [Tue, 7 Dec 2021 13:11:06 +0000 (14:11 +0100)] 
Update autosign test

Update the autosign system test with new expected behavior.

The 'nozsk.example' zone should have its expired zone signatures
deleted and replaced with signatures generated with the KSK.

The 'inaczsk.example' zone should have its expired zone signatures
deleted and replaced with signatures generated with the KSK.

In both scenarios, signatures are deleted, not retained, so the
"retaining signatures" warning should not be logged.

Furthermore, thsi commit fixex a test bug where the 'awk' command
always returned 0.

Finally, this commit adds a test case for an offline KSK, for the zone
'noksk.example'. In this case the expired signatures should be retained
(despite the zone being bogus, but resigning the DNSKEY RRset with the
ZSK won't help here).

4 years agoFix bug introduced by #763 related to offline keys
Matthijs Mekking [Tue, 7 Dec 2021 12:59:42 +0000 (13:59 +0100)] 
Fix bug introduced by #763 related to offline keys

In some cases we want to keep expired signatures. For example, if the
KSK is offline, we don't want to fall back to signing with the ZSK.
We could remove the signatures, but in any case we end up with a broken
zone.

The change made for GL #763 prevented the behavior to sign the DNSKEY
RRset with the ZSK if the KSK was offline (and signatures were expired).

The change causes the definition of "having both keys": if one key is
offline, we still consider having both keys, so we don't fallback
signing with the ZSK if KSK is offline.

That change also works the other way, if the ZSK is offline, we don't
fallback signing with the KSK.

This commit fixes that, so we only fallback signing zone RRsets with
the KSK, not signing key RRsets with the ZSK.

4 years agoOnly warn if we could not delete signature
Matthijs Mekking [Fri, 3 Dec 2021 15:18:13 +0000 (16:18 +0100)] 
Only warn if we could not delete signature

BIND can log this warning:

    zone example.ch/IN (signed): Key example.ch/ECDSAP256SHA256/56340
      missing or inactive and has no replacement: retaining signatures.

This log can happen when BIND tries to remove signatures because the
are about to expire or to be resigned. These RRsets may be signed with
the KSK if the ZSK files has been removed from disk. When we have
created a new ZSK we can replace the signatures creeated by the KSK
with signatures from the new ZSK.

It complains about the KSK being missing or inactive, but actually it
takes the key id from the RRSIG.

The warning is logged if BIND detects the private ZSK file is missing.

The warning is logged even if we were able to delete the signature.

With the change from this commit it only logs this warning if it is not
okay to delete the signature.

4 years agoMerge branch '3071-signed-version-of-an-inline-signed-zone-may-be-dumped-without...
Ondřej Surý [Wed, 5 Jan 2022 16:57:20 +0000 (16:57 +0000)] 
Merge branch '3071-signed-version-of-an-inline-signed-zone-may-be-dumped-without-unsigned-serial-number-fix' into 'main'

Check unsigned serial number in signed zone files

Closes #3071

See merge request isc-projects/bind9!5692

4 years agoAdd CHANGES and release note for [GL #3071]
Ondřej Surý [Mon, 3 Jan 2022 12:30:40 +0000 (13:30 +0100)] 
Add CHANGES and release note for [GL #3071]

4 years agoRevert "Add CHANGES and release note for [GL #3071]"
Ondřej Surý [Wed, 5 Jan 2022 16:50:51 +0000 (17:50 +0100)] 
Revert "Add CHANGES and release note for [GL #3071]"

This reverts commit 7a6365d02875ca1344013ad16ae2d33a51307bec.

4 years agoDo not detach raw zone until dumping is complete
Michał Kępień [Tue, 4 Jan 2022 14:41:46 +0000 (15:41 +0100)] 
Do not detach raw zone until dumping is complete

When the signed version of an inline-signed zone is dumped to disk, the
serial number of the unsigned version of the zone is stored in the
raw-format header so that the contents of the signed zone can be
resynchronized after named restart if the unsigned zone file is modified
while named is not running.

In order for the serial number of the unsigned zone to be determined
during the dump, zone->raw must be set to a non-NULL value.  This should
always be the case as long as the signed version of the zone is used for
anything by named.

However, a scenario exists in which the signed version of the zone has
zone->raw set to NULL while it is being dumped:

 1. Zone dump is requested; zone_dump() is invoked.

 2. Another zone dump is already in progress, so the dump gets deferred
    until I/O is available (see zonemgr_getio()).

 3. The last external reference to the zone is released.
    zone_shutdown() gets queued to the zone's task.

 4. I/O becomes available for zone dumping.  zone_gotwritehandle() gets
    queued to the zone's task.

 5. The zone's task runs zone_shutdown().  zone->raw gets set to NULL.

 6. The zone's task runs zone_gotwritehandle().  zone->raw is determined
    to be NULL, causing the serial number of the unsigned version of the
    zone to be omitted from the raw-format dump of the signed zone file.

Note that the naïve solution - deferring the dns_zone_detach() call for
zone->raw until zone_free() gets called for the secure version of the
zone - does not work because it leads to a chicken-and-egg problem when
the inline-signed zone is about to get freed: the raw zone holds a weak
reference to the secure zone and that reference does not get released
until the reference count for the raw zone reaches zero, which in turn
would not happen until all weak references to the secure zone were
released.

Defer detaching from zone->raw in zone_shutdown() if the zone is in the
process of being dumped to disk.  Ensure zone->raw gets detached from
after the dump is finished if detaching gets deferred.  Prevent zone
dumping from being requeued upon failure if the zone is in the process
of being cleaned up as it opens up possibilities for the zone->raw
reference to leak, triggering a shutdown hang.

4 years agoRevert "Ensure the correct ordering zone_shutdown() vs zone_gotwritehandle()"
Ondřej Surý [Wed, 5 Jan 2022 16:49:59 +0000 (17:49 +0100)] 
Revert "Ensure the correct ordering zone_shutdown() vs zone_gotwritehandle()"

This reverts commit cc1d4e1aa63fdc7e82a00fd7b06d50fb4dbc8e96.

4 years agoCheck unsigned serial number in signed zone files
Michał Kępień [Tue, 4 Jan 2022 14:41:46 +0000 (15:41 +0100)] 
Check unsigned serial number in signed zone files

All signed zone files present in bin/tests/system/inline/ns8 should
contain the unsigned serial number in the raw-format header.  Add a
check to ensure that is the case.  Extend the dnssec-signzone command
line in ns8/sign.sh with the -L option to allow the zones initially
signed there to pass the newly added check.  Add another zone to the
configuration for the ns8 named instance to ensure the check also passes
when multiple zones are inline-signed by a single named instance.

4 years agoMerge branch 'ondrej/reduce-the-memory-used-by-hazard-pointers' into 'main'
Ondřej Surý [Wed, 5 Jan 2022 16:36:04 +0000 (16:36 +0000)] 
Merge branch 'ondrej/reduce-the-memory-used-by-hazard-pointers' into 'main'

Reduce the memory used by hazard pointers

See merge request isc-projects/bind9!5635

4 years agoAdd unit test of aligned isc_mem functions
Ondřej Surý [Wed, 15 Dec 2021 10:16:46 +0000 (11:16 +0100)] 
Add unit test of aligned isc_mem functions

Add unit test that checks whether all the aligned functions work and
that allocators return memory aligned at the specified boundary.

4 years agoUse isc_mem_get_aligned() for isc_queue and cleanup max_threads
Ondřej Surý [Tue, 14 Dec 2021 21:16:39 +0000 (22:16 +0100)] 
Use isc_mem_get_aligned() for isc_queue and cleanup max_threads

The isc_queue_new() was using dirty tricks to allocate the head and tail
members of the struct aligned to the cacheline.  We can now use
isc_mem_get_aligned() to allocate the structure to the cacheline
directly.

Use ISC_OS_CACHELINE_SIZE (64) instead of arbitrary ALIGNMENT (128), one
cacheline size is enough to prevent false sharing.

Cleanup the unused max_threads variable - there was actually no limit on
the maximum number of threads.  This was changed a while ago.

4 years agoReduce the memory used by hazard pointers
Ondřej Surý [Thu, 9 Dec 2021 10:40:02 +0000 (11:40 +0100)] 
Reduce the memory used by hazard pointers

The hazard pointers implementation was bit of frivolous with memory
usage allocating memory based on maximum constants rather than on the
usage.

Make the retired list bit use exactly the memory needed for specified
number of hazard pointers.  This reduced the memory used by hazard
pointers to one quarter in our specific case because we only use single
HP in the queue implementation (as opposed to allocating memory for
HP_MAX_HPS = 4).

Previously, the alignment to prevent false sharing was double the
cacheline size.  This was copied from the ConcurrencyFreaks
implementation, but one cacheline size is enough to prevent false
sharing, so we are using this now to save few bits of memory.

The top level hazard pointers and retired list arrays are now not
aligned to the cacheline size - they are read-only for the whole
life-time of the isc_hp object.  Only hp (hazard pointer) and
rl (retired list) array members are allocated aligned to the cacheline
size to avoid false sharing between threads.

Cleanup HP_MAX_HPS and HP_THRESHOLD_R constants from the paper, because
we don't use them in the code.  HP_THRESHOLD_R was 0, so the check
whether the retired list size was smaller than the value was basically a
dead code.

4 years agoAdd isc_mem_*_aligned() function that works with aligned memory
Ondřej Surý [Tue, 14 Dec 2021 20:50:23 +0000 (21:50 +0100)] 
Add isc_mem_*_aligned() function that works with aligned memory

There are some situations where having aligned allocations would be
useful, so we don't have to play tricks with padding the data to the
cacheline sizes.

Add isc_mem_{get,put,reget,putanddetach}_aligned() functions that has
alignment and size as last argument mimicking the POSIX posix_memalign()
functions on systems with jemalloc (see the documentation on
MALLOX_ALIGN() for more details).  On systems without jemalloc, those
functions are same as non-aligned variants.

4 years agoAdd #define ISC_OS_CACHELINE_SIZE 64
Ondřej Surý [Tue, 14 Dec 2021 20:49:53 +0000 (21:49 +0100)] 
Add #define ISC_OS_CACHELINE_SIZE 64

Add library ctor and dtor for isc_os compilation unit which initializes
the numbers of the CPUs and also checks whether L1 cacheline size is
really 64 if the sysconf() call is available.

4 years agoMerge branch '2979-lock-view-while-accessing-its-zone-table' into 'main'
Ondřej Surý [Wed, 5 Jan 2022 15:58:02 +0000 (15:58 +0000)] 
Merge branch '2979-lock-view-while-accessing-its-zone-table' into 'main'

Lock view while accessing its zone table

Closes #2979

See merge request isc-projects/bind9!5676

4 years agoMerge branch 'ondrej/fix-taskmgr-exiting-access' into 'main'
Ondřej Surý [Wed, 5 Jan 2022 15:56:31 +0000 (15:56 +0000)] 
Merge branch 'ondrej/fix-taskmgr-exiting-access' into 'main'

Fixup code related to the taskmgr shutdown

See merge request isc-projects/bind9!5690

4 years agoAdd isc_refcount_destroy() for dns_zt reference counters
Ondřej Surý [Mon, 3 Jan 2022 20:37:54 +0000 (21:37 +0100)] 
Add isc_refcount_destroy() for dns_zt reference counters

The zt_destroy() function was missing isc_refcount_destroy() on the two
reference counters.  The isc_refcount_destroy() adds proper memory
ordering on destroy and also ensures that the reference counters have
been zeroed before destroying the object.

4 years agoLock view while accessing its zone table
Ondřej Surý [Mon, 3 Jan 2022 20:37:46 +0000 (21:37 +0100)] 
Lock view while accessing its zone table

Commit 308bc46a59302c88ecff11d4831475ecfa8b8fb0 introduced a change to
the view_flushanddetach() function which makes the latter access
view->zonetable without holding view->lock.  As confirmed by TSAN, this
enables races between threads for view->zonetable accesses.

Swap the view->zonetable pointer under view lock and then detach the
local swapped dns_zt_t later when the view lock is already unlocked.

This commit also changes the dns_zt interfaces, so the setting the
zonetable "flush" flag is separate operation to dns_zt_detach,
e.g. instead of doing:

    if (view->flush) {
        dns_zt_flushanddetach(&zt);
    } else {
        dns_zt_detach(&zt);
    }

the code is now:

    if (view->flush) {
        dns_zt_flush(zt);
    }
    dns_zt_detach(&zt);

making the code more consistent with how we handle flushing and
detaching dns_zone_t pointers from the view.

4 years agoRemove taskmgr->excl_lock, fix the locking for taskmgr->exiting
Ondřej Surý [Wed, 5 Jan 2022 12:06:37 +0000 (13:06 +0100)] 
Remove taskmgr->excl_lock, fix the locking for taskmgr->exiting

While doing code review, it was found that the taskmgr->exiting is set
under taskmgr->lock, but accessed under taskmgr->excl_lock in the
isc_task_beginexclusive().

Additionally, before the change that moved running the tasks to the
netmgr, the task_ready() subrouting of isc_task_detach() would lock
mgr->lock, requiring the mgr->excl to be protected mgr->excl_lock
to prevent deadlock in the code.  After !4918 has been merged, this is
no longer true, and we can remove taskmgr->excl_lock and use
taskmgr->lock in its stead.

Solve both issues by removing the taskmgr->excl_lock and exclusively use
taskmgr->lock to protect both taskmgr->excl and taskmgr->exiting which
now doesn't need to be atomic_bool, because it's always accessed from
within the locked section.

4 years agoOn shutdown, return ISC_R_SHUTTINGDOWN from isc_taskmgr_excltask()
Ondřej Surý [Wed, 5 Jan 2022 10:48:22 +0000 (11:48 +0100)] 
On shutdown, return ISC_R_SHUTTINGDOWN from isc_taskmgr_excltask()

The isc_taskmgr_excltask() would return ISC_R_NOTFOUND either when the
exclusive task was not set (yet) or when the taskmgr is shutting down
and the exclusive task has been already cleared.

Distinguish between the two states and return ISC_R_SHUTTINGDOWN when
the taskmgr is being shut down instead of ISC_R_NOTFOUND.

4 years agoMerge branch '3074-catz-excl-task' into 'main'
Ondřej Surý [Wed, 5 Jan 2022 12:37:27 +0000 (12:37 +0000)] 
Merge branch '3074-catz-excl-task' into 'main'

Prevent a shutdown race in catz_create_chg_task()

Closes #3074

See merge request isc-projects/bind9!5687

4 years agoAdd CHANGES note for [GL #3074]
Evan Hunt [Tue, 4 Jan 2022 20:14:32 +0000 (12:14 -0800)] 
Add CHANGES note for [GL #3074]

4 years agoPrevent a shutdown race in catz_create_chg_task()
Evan Hunt [Tue, 4 Jan 2022 20:08:43 +0000 (12:08 -0800)] 
Prevent a shutdown race in catz_create_chg_task()

If a catz event is scheduled while the task manager was being
shut down, task-exclusive mode is unavailable. This needs to be
handled as an error rather than triggering an assertion.

4 years agoMerge branch '3023-auto-dnssec-documentation-bug' into 'main'
Matthijs Mekking [Wed, 5 Jan 2022 11:26:14 +0000 (11:26 +0000)] 
Merge branch '3023-auto-dnssec-documentation-bug' into 'main'

Update auto-dnssec documentation

Closes #3023

See merge request isc-projects/bind9!5598

4 years agoAdd CHANGES for #3023
Matthijs Mekking [Fri, 26 Nov 2021 09:38:59 +0000 (10:38 +0100)] 
Add CHANGES for #3023

4 years agoUpdate auto-dnssec documentation
Matthijs Mekking [Fri, 26 Nov 2021 09:37:06 +0000 (10:37 +0100)] 
Update auto-dnssec documentation

Explain that 'auto-dnssec' may only be activated at zone level.

4 years agoMerge branch '3071-signed-version-of-an-inline-signed-zone-may-be-dumped-without...
Ondřej Surý [Wed, 5 Jan 2022 09:32:25 +0000 (09:32 +0000)] 
Merge branch '3071-signed-version-of-an-inline-signed-zone-may-be-dumped-without-unsigned-serial-number' into 'main'

Do not detach raw zone until dumping is complete

Closes #3071

See merge request isc-projects/bind9!5680

4 years agoAdd CHANGES and release note for [GL #3071]
Ondřej Surý [Mon, 3 Jan 2022 12:30:40 +0000 (13:30 +0100)] 
Add CHANGES and release note for [GL #3071]

4 years agoEnsure the correct ordering zone_shutdown() vs zone_gotwritehandle()
Michał Kępień [Thu, 30 Dec 2021 14:14:11 +0000 (15:14 +0100)] 
Ensure the correct ordering zone_shutdown() vs zone_gotwritehandle()

When the signed version of an inline-signed zone is dumped to disk, the
serial number of the unsigned version of the zone is written in the
raw-format header so that the contents of the signed zone can be
resynchronized after named restart if the unsigned zone file is
modified while named is not running (see RT #26676).

In order for the serial number of the unsigned zone to be determined
during the dump, zone->raw must be set to a non-NULL value.  This
should always be the case as long as the signed version of the zone is
used for anything by named.

However, under certain circumstances the zone->raw could be set to NULL
while the zone is being dumped.

Defer detaching from zone->raw in zone_shutdown() if the zone is in the
process of being dumped to disk.

4 years agoMerge branch '3075-fix-tlsctx-detach' into 'main'
Evan Hunt [Wed, 5 Jan 2022 07:07:47 +0000 (07:07 +0000)] 
Merge branch '3075-fix-tlsctx-detach' into 'main'

Ensure that cache pointer is set to NULL by isc_tlsctx_cache_detach()

Closes #3075

See merge request isc-projects/bind9!5686

4 years agoClean up isc_tlsctx_cache_detach()
Evan Hunt [Tue, 4 Jan 2022 21:02:44 +0000 (13:02 -0800)] 
Clean up isc_tlsctx_cache_detach()

For consistency with similar functions, rename `pcache` to `cachep`,
call a separate destroy function when references reach 0, and add
a missing call to isc_refcount_destroy().

4 years agoEnsure that cache pointer is set to NULL by isc_tlsctx_cache_detach()
Evan Hunt [Tue, 4 Jan 2022 19:48:25 +0000 (11:48 -0800)] 
Ensure that cache pointer is set to NULL by isc_tlsctx_cache_detach()

If the reference count was higher than 1, detaching a tlsctx cache
didn't clear the pointer, which could trigger an assertion later.

4 years agoMerge branch '3032-include-isc-logo-in-source-tarballs' into 'main'
Michał Kępień [Tue, 4 Jan 2022 13:43:07 +0000 (13:43 +0000)] 
Merge branch '3032-include-isc-logo-in-source-tarballs' into 'main'

Include doc/arm/isc-logo.pdf in source tarballs

Closes #3032

See merge request isc-projects/bind9!5678

4 years agoInclude doc/arm/isc-logo.pdf in source tarballs
Michał Kępień [Tue, 4 Jan 2022 13:37:52 +0000 (14:37 +0100)] 
Include doc/arm/isc-logo.pdf in source tarballs

The doc/arm/conf.py Sphinx configuration file specifies
doc/arm/isc-logo.pdf as the logo to use in the PDF files produced.
Since doc/arm/isc-logo.pdf is not currently included in source tarballs
produced using "make dist", attempting to build documentation in PDF
format using a source tarball results in the following error being
raised:

    Sphinx error:
    logo file 'isc-logo.pdf' does not exist

Ensure doc/arm/isc-logo.pdf is included in source tarballs produced
using "make dist", so that the BIND 9 ARM can be successfully built in
PDF format using just the source tarball.

4 years agoAdd a tarball-based documentation-building job
Michał Kępień [Tue, 4 Jan 2022 13:37:52 +0000 (14:37 +0100)] 
Add a tarball-based documentation-building job

The existing "docs" GitLab CI job operates on a Git repository rather
than a source tarball.  This prevents it from detecting issues caused by
files missing from source tarballs.  Add a new GitLab CI job similar to
the "docs" one, but using a source tarball rather than a Git repository.
Extract YAML bits used by multiple job definitions into anchors to avoid
code duplication.  Drop the "allow_failure: false" key in the process as
it is the implicit default for non-manual jobs.  Replace the
"artifacts:paths" key with "artifacts:untracked" in order to include all
untracked files in the artifact archive for each documentation-building
job; this allows tarball-based artifacts to be properly captured and
also facilitates troubleshooting failed jobs.

4 years agoMerge branch '3065-memory-leak-on-duplicately-named-dnssec-policy' into 'main'
Mark Andrews [Mon, 3 Jan 2022 21:45:01 +0000 (21:45 +0000)] 
Merge branch '3065-memory-leak-on-duplicately-named-dnssec-policy' into 'main'

Resolve "memory leak on duplicately named dnssec-policy"

Closes #3065

See merge request isc-projects/bind9!5669

4 years agoAdd CHANGES for [GL #3065]
Mark Andrews [Thu, 23 Dec 2021 12:46:40 +0000 (23:46 +1100)] 
Add CHANGES for [GL #3065]

4 years agoReport duplicate dnssec-policy names
Mark Andrews [Thu, 23 Dec 2021 06:54:53 +0000 (17:54 +1100)] 
Report duplicate dnssec-policy names

Duplicate dnssec-policy names were detected as an error condition
but were not logged.

4 years agoAddress memory leak when processing dnssec-policy clauses
Mark Andrews [Thu, 23 Dec 2021 06:42:39 +0000 (17:42 +1100)] 
Address memory leak when processing dnssec-policy clauses

A kasp structure was not detached when looking to see if there
was an existing kasp structure with the same name, causing memory
to be leaked.  Fixed by calling dns_kasp_detach() to release the
reference.

4 years agoMerge branch 'mnowak/drop-xmllint-check-from-misc-ci-job' into 'main'
Michal Nowak [Mon, 3 Jan 2022 15:47:00 +0000 (15:47 +0000)] 
Merge branch 'mnowak/drop-xmllint-check-from-misc-ci-job' into 'main'

Drop xmllint check from misc CI job

See merge request isc-projects/bind9!5684

4 years agoDrop xmllint check from misc CI job
Michal Nowak [Mon, 3 Jan 2022 09:34:19 +0000 (10:34 +0100)] 
Drop xmllint check from misc CI job

There are no XML or docbook files in the "main" source tree to be
checked and the xmllint command just prints out a usage message.

4 years agoMerge branch 'mnowak/year-2022' into 'main'
Michal Nowak [Mon, 3 Jan 2022 14:50:33 +0000 (14:50 +0000)] 
Merge branch 'mnowak/year-2022' into 'main'

Update copyrights to 2022

See merge request isc-projects/bind9!5681

4 years agoUpdate copyrights to 2022
Michal Nowak [Mon, 3 Jan 2022 09:29:49 +0000 (10:29 +0100)] 
Update copyrights to 2022

4 years agoMerge branch '2782-set-version-and-release-variables-in-conf.py' into 'main'
Michał Kępień [Wed, 29 Dec 2021 09:02:10 +0000 (09:02 +0000)] 
Merge branch '2782-set-version-and-release-variables-in-conf.py' into 'main'

Set version and release variables in conf.py

Closes #2782

See merge request isc-projects/bind9!5205

4 years agoClarify use of the "today" Sphinx variable
Michał Kępień [Wed, 29 Dec 2021 08:58:48 +0000 (09:58 +0100)] 
Clarify use of the "today" Sphinx variable

Add a comment explaining the purpose of setting the "today" variable in
Sphinx invocations to prevent confusion caused by the absence of that
variable from reStructuredText sources.

Drop the -A command-line option from the sphinx-build invocation for
EPUB output as "today" is already set in the ALLSPHINXOPTS variable.

4 years agoSet version and release variables in conf.py
Michał Kępień [Wed, 29 Dec 2021 08:58:48 +0000 (09:58 +0100)] 
Set version and release variables in conf.py

Some Sphinx variables used in the ARM are only set in Makefile.docs.
This works fine when building the ARM using "make", but does not work
with Read the Docs, which only looks at conf.py files.

Since Read the Docs does not run ./configure, renaming conf.py to
conf.py.in and using Autoconf output variables is not a feasible
solution.

Instead, extend doc/arm/conf.py with some Python code which processes
configure.ac using regular expressions and sets the relevant Sphinx
variables accordingly.  As this solution also works fine when building
the ARM using "make", drop the relevant -D options from the list of
sphinx-build options used for building the ARM in Makefile.docs.

Note that the man_SPHINXOPTS counterparts of the removed -D switches are
left intact because doc/man/conf.py is a separate Sphinx project which
is only processed using "make" and duplicating the Python code added to
doc/arm/conf.py by this commit would be inelegant.

4 years agoMerge branch 'artem-tlsctx-caching' into 'main'
Artem Boldariev [Wed, 29 Dec 2021 08:58:10 +0000 (08:58 +0000)] 
Merge branch 'artem-tlsctx-caching' into 'main'

Add TLS context cache

Closes #3067

See merge request isc-projects/bind9!5672

4 years agoAdd a CHANGES entry [GL !5672]
Artem Boldariev [Fri, 24 Dec 2021 12:54:19 +0000 (14:54 +0200)] 
Add a CHANGES entry [GL !5672]

Mention that TLS contexts reuse was implemented.

4 years agoUse the TLS context cache for client-side contexts (XoT)
Artem Boldariev [Thu, 23 Dec 2021 14:08:41 +0000 (16:08 +0200)] 
Use the TLS context cache for client-side contexts (XoT)

This commit enables client-side TLS contexts re-use for zone transfers
over TLS. That, in turn, makes it possible to use the internal session
cache associated with the contexts, allowing the TLS connections to be
established faster and requiring fewer resources by not going through
the full TLS handshake procedure.

Previously that would recreate the context on every connection, making
TLS session resumption impossible.

Also, this change lays down a foundation for Strict TLS (when the
client validates a server certificate), as the TLS context cache can
be extended to store additional data required for validation (like
intermediates CA chain).

4 years agoUse the TLS context cache for server-side contexts
Artem Boldariev [Thu, 23 Dec 2021 10:01:34 +0000 (12:01 +0200)] 
Use the TLS context cache for server-side contexts

Using the TLS context cache for server-side contexts could reduce the
number of contexts to initialise in the configurations when e.g. the
same 'tls' entry is used in multiple 'listen-on' statements for the
same DNS transport, binding to multiple IP addresses.

In such a case, only one TLS context will be created, instead of a
context per IP address, which could reduce the initialisation time, as
initialising even a non-ephemeral TLS context introduces some delay,
which can be *visually* noticeable by log activity.

Also, this change lays down a foundation for Mutual TLS (when the
server validates a client certificate, additionally to a client
validating the server), as the TLS context cache can be extended to
store additional data required for validation (like intermediates CA
chain).

Additionally to the above, the change ensures that the contexts are
not being changed after initialisation, as such a practice is frowned
upon. Previously we would set the supported ALPN tags within
isc_nm_listenhttp() and isc_nm_listentlsdns(). We do not do that for
client-side contexts, so that appears to be an overlook. Now we set
the supported ALPN tags right after server-side contexts creation,
similarly how we do for client-side ones.

4 years agoAdd TLS context cache
Artem Boldariev [Wed, 22 Dec 2021 15:11:11 +0000 (17:11 +0200)] 
Add TLS context cache

This commit adds a TLS context object cache implementation. The
intention of having this object is manyfold:

- In the case of client-side contexts: allow reusing the previously
created contexts to employ the context-specific TLS session resumption
cache. That will enable XoT connection to be reestablished faster and
with fewer resources by not going through the full TLS handshake
procedure.

- In the case of server-side contexts: reduce the number of contexts
created on startup. That could reduce startup time in a case when
there are many "listen-on" statements referring to a smaller amount of
`tls` statements, especially when "ephemeral" certificates are
involved.

- The long-term goal is to provide in-memory storage for additional
data associated with the certificates, like runtime
representation (X509_STORE) of intermediate CA-certificates bundle for
Strict TLS/Mutual TLS ("ca-file").

4 years agoMerge branch 'michal/fix-error-codes-passed-to-connection-callbacks' into 'main'
Michał Kępień [Tue, 28 Dec 2021 15:14:11 +0000 (15:14 +0000)] 
Merge branch 'michal/fix-error-codes-passed-to-connection-callbacks' into 'main'

Fix error codes passed to connection callbacks

See merge request isc-projects/bind9!5675

4 years agoFix error codes passed to connection callbacks
Michał Kępień [Tue, 28 Dec 2021 14:09:50 +0000 (15:09 +0100)] 
Fix error codes passed to connection callbacks

Commit 9ee60e7a17bf34c7ef7f4d79e6a00ca45444ec8c erroneously introduced
duplicate conditions to several existing conditional statements
responsible for determining error codes passed to connection callbacks
upon failure.  Fix the affected expressions to ensure connection
callbacks are invoked with:

  - the ISC_R_SHUTTINGDOWN error code when a global netmgr shutdown is
    in progress,

  - the ISC_R_CANCELED error code when a specific operation has been
    canceled.

This does not fix any known bugs, it only adjusts the changes introduced
by commit 9ee60e7a17bf34c7ef7f4d79e6a00ca45444ec8c so that they match
its original intent.

4 years agoMerge branch '3068-fix-rare-control-channel-socket-reference-leak' into 'main'
Michał Kępień [Tue, 28 Dec 2021 12:42:45 +0000 (12:42 +0000)] 
Merge branch '3068-fix-rare-control-channel-socket-reference-leak' into 'main'

Fix rare control channel socket reference leak

Closes #3068

See merge request isc-projects/bind9!5673

4 years agoFix rare control channel socket reference leak
Michał Kępień [Mon, 27 Dec 2021 14:41:04 +0000 (15:41 +0100)] 
Fix rare control channel socket reference leak

Commit 9ee60e7a17bf34c7ef7f4d79e6a00ca45444ec8c enabled netmgr shutdown
to cause read callbacks for active control channel sockets to be invoked
with the ISC_R_SHUTTINGDOWN result code.  However, control channel code
only recognizes ISC_R_CANCELED as an indicator of an in-progress netmgr
shutdown (which was correct before the above commit).  This discrepancy
enables the following scenario to happen in rare cases:

 1. A control channel request is received and responded to.  libuv
    manages to write the response to the TCP socket, but the completion
    callback (control_senddone()) is yet to be invoked.

 2. Server shutdown is initiated.  All TCP sockets are shut down, which
    i.a. causes control_recvmessage() to be invoked with the
    ISC_R_SHUTTINGDOWN result code.  As the result code is not
    ISC_R_CANCELED, control_recvmessage() does not set
    listener->controls->shuttingdown to 'true'.

 3. control_senddone() is called with the ISC_R_SUCCESS result code.  As
    neither listener->controls->shuttingdown is 'true' nor is the result
    code ISC_R_CANCELED, reading is resumed on the control channel
    socket.  However, this read can never be completed because the read
    callback on that socket was cleared when the TCP socket was shut
    down.  This causes a reference on the socket's handle to be held
    indefinitely, leading to a hang upon shutdown.

Ensure listener->controls->shuttingdown is also set to 'true' when
control_recvmessage() is invoked with the ISC_R_SHUTTINGDOWN result
code.  This ensures the send completion callback does not resume reading
after the control channel socket is shut down.

4 years agoMerge branch 'mnowak/make-debian-11-bullseye-base-image' into 'main'
Michal Nowak [Thu, 23 Dec 2021 14:41:45 +0000 (14:41 +0000)] 
Merge branch 'mnowak/make-debian-11-bullseye-base-image' into 'main'

Make bullseye the base image

See merge request isc-projects/bind9!5367

4 years agoUse /dev/urandom as BIND 9.11 randomness source
Michal Nowak [Mon, 6 Sep 2021 10:04:49 +0000 (12:04 +0200)] 
Use /dev/urandom as BIND 9.11 randomness source

This prevents resolver timeouts for the reference (BIND 9.11) servers
used in respdiff tests run on Debian 11 "bullseye".

4 years agoMake bullseye the base image
Michal Nowak [Wed, 25 Aug 2021 16:11:43 +0000 (18:11 +0200)] 
Make bullseye the base image

"buster" jobs are now only going to be run in scheduled pipelines.

"--without-gssapi" ./configure option of "bullseye" before it became
the base image is dropped from "bullseye"-the-base-image because it
reduces gcov coverage by 0.38 % (651 lines) and is used in Debian 9
"stretch".

4 years agoMerge branch '3041-decide-what-to-do-with-reject-000-and-other-obscure-options-for...
Mark Andrews [Thu, 23 Dec 2021 05:14:50 +0000 (05:14 +0000)] 
Merge branch '3041-decide-what-to-do-with-reject-000-and-other-obscure-options-for-synth-from-dnssec-feature' into 'main'

remove reject-000 and broken-nsec options (related to synth-from-dnssec feature)

Closes #3041

See merge request isc-projects/bind9!5621

4 years agoremove broken-nsec and reject-000-label options
Mark Andrews [Wed, 8 Dec 2021 07:02:28 +0000 (18:02 +1100)] 
remove broken-nsec and reject-000-label options

4 years agoMerge branch 'rhbz/fedora/2032704' into 'main'
Michał Kępień [Wed, 22 Dec 2021 21:14:22 +0000 (21:14 +0000)] 
Merge branch 'rhbz/fedora/2032704' into 'main'

Avoid conflict with ldap_connect function of openldap

See merge request isc-projects/bind9!5665

4 years agoChange all internal functions to dlz_ldap prefix
Petr Mensik [Wed, 22 Dec 2021 12:38:02 +0000 (13:38 +0100)] 
Change all internal functions to dlz_ldap prefix

To prevent any conflict in the future, avoid ldap_ prefix in any
internal functions. Keep it reserved for openldap only.

4 years agoAvoid conflict with ldap_connect function of openldap
Petr Mensik [Wed, 22 Dec 2021 12:36:39 +0000 (13:36 +0100)] 
Avoid conflict with ldap_connect function of openldap

ldap_connect is defined by OpenLDAP 2.6. Compiler complains there are
conflicting declarations. Use dlz_ldap prefix instead of ldap to avoid
conflict.

4 years agoMerge branch '2723-add-SSLKEYLOGFILE-support' into 'main'
Michał Kępień [Wed, 22 Dec 2021 20:08:46 +0000 (20:08 +0000)] 
Merge branch '2723-add-SSLKEYLOGFILE-support' into 'main'

Add SSLKEYLOGFILE support

Closes #2723

See merge request isc-projects/bind9!5661

4 years agoAdd CHANGES entry for GL #2723
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Add CHANGES entry for GL #2723

4 years agoAdd release note for GL #2723
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Add release note for GL #2723

4 years agoDocument SSLKEYLOGFILE handling
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Document SSLKEYLOGFILE handling

Add a section to the ARM explaining how to set the SSLKEYLOGFILE
environment variable in order to prepare a key log file for debugging
purposes.

4 years agoSet up default logging for SSLKEYLOGFILE
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Set up default logging for SSLKEYLOGFILE

A customary method of exporting TLS pre-master secrets used by a piece
of software (for debugging purposes, e.g. to examine decrypted traffic
in a packet sniffer) is to set the SSLKEYLOGFILE environment variable to
the path to the file in which this data should be logged.

In order to enable writing any data to a file using the logging
framework provided by libisc, a logging channel needs to be defined and
the relevant logging category needs to be associated with it.  Since the
SSLKEYLOGFILE variable is only expected to contain a path, some defaults
for the logging channel need to be assumed.  Add a new function,
named_log_setdefaultsslkeylogfile(), for setting up those implicit
defaults, which are equivalent to the following logging configuration:

    channel default_sslkeylogfile {
        file "${SSLKEYLOGFILE}" versions 10 size 100m suffix timestamp;
    };

    category sslkeylog {
     default_sslkeylogfile;
    };

This ensures TLS pre-master secrets do not use up more than about 1 GB
of disk space, which should be enough to hold debugging data for the
most recent 1 million TLS connections.

As these values are arguably not universally appropriate for all
deployment environments, a way for overriding them needs to exist.
Suppress creation of the default logging channel for TLS pre-master
secrets when the SSLKEYLOGFILE variable is set to the string "config".
This enables providing custom logging configuration for the relevant
category via the "logging" stanza.  (Note that it would have been
simpler to only skip setting up the default logging channel for TLS
pre-master secrets if the SSLKEYLOGFILE environment variable is not set
at all.  However, libisc only logs pre-master secrets if that variable
is set.  Detecting a "magic" string enables the SSLKEYLOGFILE
environment variable to serve as a single control for both enabling TLS
pre-master secret collection and potentially also indicating where and
how they should be exported.)

4 years agoCheck for SSL_CTX_set_keylog_callback() support
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Check for SSL_CTX_set_keylog_callback() support

The SSL_CTX_set_keylog_callback() function is a fairly recent OpenSSL
addition, having first appeared in version 1.1.1.  Add a configure.ac
check for the availability of that function to prevent build errors on
older platforms.  Sort similar checks alphabetically.

This makes the SSLKEYLOGFILE mechanism a silent no-op on unsupported
platforms, which is considered acceptable for a debugging feature.

4 years agoLog TLS pre-master secrets when requested
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Log TLS pre-master secrets when requested

Generate log messages containing TLS pre-master secrets when the
SSLKEYLOGFILE environment variable is set.  This only ensures such
messages are prepared using the right logging category and passed to
libisc for further processing.

The TLS pre-master secret logging callback needs to be set on a
per-context basis, so ensure it happens for both client-side and
server-side TLS contexts.

4 years agoAdd a logging category for TLS pre-master secrets
Michał Kępień [Wed, 22 Dec 2021 17:17:26 +0000 (18:17 +0100)] 
Add a logging category for TLS pre-master secrets

TLS pre-master secrets will be dumped to disk using the logging
framework provided by libisc.  Add a new logging category for this type
of debugging data in order to enable exporting it to a dedicated
channel.  Derive the name of the new category from the name of the
relevant environment variable, SSLKEYLOGFILE.

4 years agoMerge branch 'mnowak/respdiff-job-dependency-fix' into 'main'
Michal Nowak [Wed, 22 Dec 2021 14:18:44 +0000 (14:18 +0000)] 
Merge branch 'mnowak/respdiff-job-dependency-fix' into 'main'

Execute respdiff jobs out-of-order

See merge request isc-projects/bind9!5664

4 years agoExecute respdiff jobs out-of-order
Michal Nowak [Wed, 22 Dec 2021 10:14:56 +0000 (11:14 +0100)] 
Execute respdiff jobs out-of-order

Commit 2ececf2c dropped dependency of "respdiff" and
"respdiff-third-party" jobs on "tarball-create" job because these jobs
don't need to depend on in (e.g., for its artifacts). This, however,
caused that respdiff jobs weren't started out-of-order and artifacts
from all the "Build" stage jobs plus "unit:gcc:buster:amd64" job were
downloaded to project directory and caused problems with compilation:

Originally, the dependency on "tarball-create" has been added in
04f8b65a to indicate that respdiff "is meant to operate on two different
BIND versions". It seems that the intent didn't work out, and we better
make it obvious that respdiff jobs don't depend on any other job and
should be run out-of-order.

4 years agoMerge branch 'mnowak/freebsd-12.3' into 'main'
Michal Nowak [Mon, 20 Dec 2021 15:58:38 +0000 (15:58 +0000)] 
Merge branch 'mnowak/freebsd-12.3' into 'main'

Add FreeBSD 12.3

See merge request isc-projects/bind9!5619

4 years agoAdd FreeBSD 12.3
Michal Nowak [Tue, 7 Dec 2021 16:08:49 +0000 (17:08 +0100)] 
Add FreeBSD 12.3

4 years agoMerge branch 'artem-doth-reconfig-fix' into 'main'
Artem Boldariev [Mon, 20 Dec 2021 12:46:44 +0000 (12:46 +0000)] 
Merge branch 'artem-doth-reconfig-fix' into 'main'

Fix flakiness in the doth reconfig test

See merge request isc-projects/bind9!5656

4 years agodoth system test: reduce number of contexts in ns3
Artem Boldariev [Fri, 17 Dec 2021 12:03:56 +0000 (14:03 +0200)] 
doth system test: reduce number of contexts in ns3

This commit removes unused listen-on statements from the ns3 instance
in order to reduce the startup time. That should help with occasional
system test initialisation hiccups in the CI which happen because the
required instances cannot initialise in time.

4 years agoFix flakiness in the doth reconfig test
Artem Boldariev [Fri, 17 Dec 2021 11:57:42 +0000 (13:57 +0200)] 
Fix flakiness in the doth reconfig test

Due to the fact that the primary nameserver creates a lot of TLS
contexts, its reconfiguration could take too much time on the CI,
leading to spurious test failures, while in reality it works just
fine.

This commit adds a separate instance for this test which does not use
ephemeral keys (these are costly to generate) and creates minimal
amount of TLS contexts.

4 years agoMerge branch '2264-tls-ephemeral-rsa-to-ecc' into 'main'
Arаm Sаrgsyаn [Mon, 20 Dec 2021 12:10:42 +0000 (12:10 +0000)] 
Merge branch '2264-tls-ephemeral-rsa-to-ecc' into 'main'

Use ECDSA P-256 instead of 4096-bit RSA for 'tls ephemeral'

Closes #2264

See merge request isc-projects/bind9!5627

4 years agoAdd CHANGES for [GL #2264]
Aram Sargsyan [Wed, 8 Dec 2021 16:04:32 +0000 (16:04 +0000)] 
Add CHANGES for [GL #2264]

4 years agoUse ECDSA P-256 instead of 4096-bit RSA for 'tls ephemeral'
Aram Sargsyan [Wed, 8 Dec 2021 16:04:15 +0000 (16:04 +0000)] 
Use ECDSA P-256 instead of 4096-bit RSA for 'tls ephemeral'

ECDSA P-256 performs considerably better than the previously used
4096-bit RSA (can be observed using `openssl speed`), and, according
to RFC 6605, provides a security level comparable to 3072-bit RSA.

4 years agoMerge branch 'mnowak/add-fedora-35' into 'main'
Michal Nowak [Fri, 17 Dec 2021 14:37:56 +0000 (14:37 +0000)] 
Merge branch 'mnowak/add-fedora-35' into 'main'

Add Fedora 35

See merge request isc-projects/bind9!5554

4 years agoAdd Fedora 35
Michal Nowak [Tue, 2 Nov 2021 19:56:25 +0000 (20:56 +0100)] 
Add Fedora 35

4 years agoMerge branch 'ondrej/simplify-address-sanitizer-use-in-mem.c' into 'main'
Ondřej Surý [Fri, 17 Dec 2021 14:25:54 +0000 (14:25 +0000)] 
Merge branch 'ondrej/simplify-address-sanitizer-use-in-mem.c' into 'main'

Simplify Address Sanitizer tweaks in mem.c

See merge request isc-projects/bind9!5643

4 years agoSimplify Address Sanitizer tweaks in mem.c
Ondřej Surý [Wed, 15 Dec 2021 11:07:22 +0000 (12:07 +0100)] 
Simplify Address Sanitizer tweaks in mem.c

Previously, whole isc_mempool_get() and isc_mempool_set() would be
replaced by simpler version when run with address sanitizer.

Change the code to limit the fillcount to 1 and freemax to 0.  This
change will make isc_mempool_get() to always allocate and use a single
new item and isc_mempool_put() will always return the item to the
allocator.

4 years agoMerge branch 'mnowak/drop-freebsd-11' into 'main'
Michal Nowak [Fri, 17 Dec 2021 11:48:34 +0000 (11:48 +0000)] 
Merge branch 'mnowak/drop-freebsd-11' into 'main'

Drop FreeBSD 11

See merge request isc-projects/bind9!5606