]> git.ipfire.org Git - thirdparty/bind9.git/log
thirdparty/bind9.git
5 years agoremove the remaining uses of dns_name_copy()
Evan Hunt [Sat, 22 May 2021 00:10:59 +0000 (17:10 -0700)] 
remove the remaining uses of dns_name_copy()

dns_name_copy() has been replaced nearly everywhere with
dns_name_copynf().  this commit changes the last two uses of
the original function.  afterward, we can remove the old
dns_name_copy() implementation, and replace it with _copynf().

5 years agoMerge branch '2713-intermittent-crashes-in-the-tkey-system-test-caused-by-broken...
Evan Hunt [Sat, 22 May 2021 04:30:19 +0000 (04:30 +0000)] 
Merge branch '2713-intermittent-crashes-in-the-tkey-system-test-caused-by-broken-dns_name_t-structures' into 'main'

Use dns_name_copy() to hold the copied name

Closes #2713

See merge request isc-projects/bind9!5079

5 years agoUse dns_name_copynf() with dns_message_gettempname() when needed
Ondřej Surý [Fri, 21 May 2021 13:30:00 +0000 (15:30 +0200)] 
Use dns_name_copynf() with dns_message_gettempname() when needed

dns_message_gettempname() returns an initialized name with a dedicated
buffer, associated with a dns_fixedname object.  Using dns_name_copynf()
to write a name into this object will actually copy the name data
from a source name. dns_name_clone() merely points target->ndata to
source->ndata, so it is faster, but it can lead to a use-after-free if
the source is freed before the target object is released via
dns_message_puttempname().

In a few places, clone was being used where copynf should have been;
this is now fixed.

As a side note, no memory was lost, because the ndata buffer used in
the dns_fixedname_t is internal to the structure, and is freed when
the dns_fixedname_t is freed regardless of the .ndata contents.

5 years agoMerge branch '2662-fix-broken-SYSTEMTEST_NO_CLEAN' into 'main'
Brian Conry [Fri, 21 May 2021 13:38:25 +0000 (13:38 +0000)] 
Merge branch '2662-fix-broken-SYSTEMTEST_NO_CLEAN' into 'main'

Preserve SYSTEMTEST_NO_CLEAN when run.sh calls make.

Closes #2662

See merge request isc-projects/bind9!5003

5 years agoPreserve additional environment variables with run.sh
Brian Conry [Wed, 19 May 2021 14:10:29 +0000 (09:10 -0500)] 
Preserve additional environment variables with run.sh

When executed in "legacy mode" (i.e. without the '-r' parameter)
run.sh invokes make with a modified environment.

SYSTEMTEST_FORCE_COLOR is now preserved for use by the individual test
scripts.

CYGWIN is now preserved for named, as it controls behavior relating to
crash reporting.

5 years agoPreserve SYSTEMTEST_NO_CLEAN when run.sh calls make
Brian Conry [Thu, 6 May 2021 18:50:44 +0000 (13:50 -0500)] 
Preserve SYSTEMTEST_NO_CLEAN when run.sh calls make

This restores legacy behavior in bin/tests/system where running:
  SYSTEMTEST_NO_CLEAN=1 ./run.sh <testname>
would run the test and preserve the output files.

This has been broken since the change that has run.sh invoke "make",
due to SYSTEMTEST_NO_CLEAN not being preserved in the environment
that's set up for "make".

Another option would be to completely remove SYSTEMTEST_NO_CLEAN.

This seems to be the only behavior-changing environment variable
not accounted for in the call to "make".

I don't think this needs a CHANGES entry.

5 years agoMerge branch 'michal/regenerate-man-pages-with-sphinx-4.0.2' into 'main'
Michał Kępień [Fri, 21 May 2021 09:26:16 +0000 (09:26 +0000)] 
Merge branch 'michal/regenerate-man-pages-with-sphinx-4.0.2' into 'main'

Regenerate man pages with Sphinx 4.0.2

See merge request isc-projects/bind9!5077

5 years agoExplicitly set "man_make_section_directory"
Michał Kępień [Fri, 21 May 2021 08:29:02 +0000 (10:29 +0200)] 
Explicitly set "man_make_section_directory"

The default value of the "man_make_section_directory" Sphinx option was
changed in Sphinx 4.0.1, which broke building man pages in maintainer
mode as the shell code in doc/man/Makefile.am expects man pages to be
built in doc/man/_build/man/, not doc/man/_build/man/<section_number>/.
The aforementioned change in defaults was reverted in Sphinx 4.0.2, but
this issue should still be prevented from reoccurring in the future.
Ensure that by explicitly setting the "man_make_section_directory"
option to False.

5 years agoRegenerate man pages with Sphinx 4.0.2
Michał Kępień [Fri, 21 May 2021 08:29:02 +0000 (10:29 +0200)] 
Regenerate man pages with Sphinx 4.0.2

The man pages produced by Sphinx 4.0.2 are slightly different than those
produced by Sphinx 3.5.4.  As Sphinx 4.0.2 is now used in GitLab CI,
update all doc/man/*in files so that they reflect what that version of
Sphinx produces, in order to prevent GitLab CI job failures.

5 years agoMerge branch '2515-improve-glue-cache-performance' into 'main'
Ondřej Surý [Thu, 20 May 2021 19:04:35 +0000 (19:04 +0000)] 
Merge branch '2515-improve-glue-cache-performance' into 'main'

use a fixedname buffer in dns_message_gettempname()

Closes #2515

See merge request isc-projects/bind9!5071

5 years agoOptimize rdataset_getownercase not to use bitshifts
Ondřej Surý [Thu, 20 May 2021 11:01:41 +0000 (13:01 +0200)] 
Optimize rdataset_getownercase not to use bitshifts

The last rdataset_getownercase() left it in a state where the code was
mix of microoptimizations (manual loop unrolling, complicated bitshifts)
with a code that would always rewrite the character even if it stayed
the same after transformation.

This commit makes sure that we modify only the characters that actually
need to change, removes the manual loop unrolling, and replaces the
weird bit arithmetics with a simple shift and bit-and.

5 years agouse a fixedname buffer in dns_message_gettempname()
Evan Hunt [Thu, 20 May 2021 00:18:22 +0000 (17:18 -0700)] 
use a fixedname buffer in dns_message_gettempname()

dns_message_gettempname() now returns a pointer to an initialized
name associated with a dns_fixedname_t object. it is no longer
necessary to allocate a buffer for temporary names associated with
the message object.

5 years agoMerge branch 'v9_17_13-release' into 'main'
Michał Kępień [Thu, 20 May 2021 10:10:37 +0000 (10:10 +0000)] 
Merge branch 'v9_17_13-release' into 'main'

Merge 9.17.13 release branch

See merge request isc-projects/bind9!5068

5 years agoSet up release notes for BIND 9.17.14
Michał Kępień [Thu, 20 May 2021 10:03:47 +0000 (12:03 +0200)] 
Set up release notes for BIND 9.17.14

5 years agoUpdate BIND version to 9.17.13
Michał Kępień [Wed, 12 May 2021 09:02:57 +0000 (11:02 +0200)] 
Update BIND version to 9.17.13

5 years agoAdd a CHANGES marker
Michał Kępień [Wed, 12 May 2021 09:02:57 +0000 (11:02 +0200)] 
Add a CHANGES marker

5 years agoMerge branch 'michal/prepare-documentation-for-bind-9.17.13' into 'v9_17_13-release'
Michał Kępień [Wed, 12 May 2021 09:02:07 +0000 (09:02 +0000)] 
Merge branch 'michal/prepare-documentation-for-bind-9.17.13' into 'v9_17_13-release'

Prepare documentation for BIND 9.17.13

See merge request isc-private/bind9!293

5 years agoPrepare release notes for BIND 9.17.13
Michał Kępień [Tue, 11 May 2021 21:28:48 +0000 (23:28 +0200)] 
Prepare release notes for BIND 9.17.13

5 years agoAdd release note for GL #2626
Michał Kępień [Tue, 11 May 2021 21:28:48 +0000 (23:28 +0200)] 
Add release note for GL #2626

5 years agoReorder release notes
Michał Kępień [Tue, 11 May 2021 21:28:48 +0000 (23:28 +0200)] 
Reorder release notes

5 years agoTweak and reword release notes
Michał Kępień [Tue, 11 May 2021 21:28:48 +0000 (23:28 +0200)] 
Tweak and reword release notes

5 years agoTweak and reword recent CHANGES entries
Michał Kępień [Tue, 11 May 2021 21:28:48 +0000 (23:28 +0200)] 
Tweak and reword recent CHANGES entries

5 years agoDrop duplicate release note for GL #2347
Michal Nowak [Thu, 6 May 2021 17:37:41 +0000 (19:37 +0200)] 
Drop duplicate release note for GL #2347

5 years agoFix typo in doc/dnssec-guide/recipes.rst
Michal Nowak [Wed, 5 May 2021 12:30:19 +0000 (14:30 +0200)] 
Fix typo in doc/dnssec-guide/recipes.rst

5 years agoMerge branch '1875-kasp-views-keyfile-race' into 'main'
Matthijs Mekking [Thu, 20 May 2021 07:55:26 +0000 (07:55 +0000)] 
Merge branch '1875-kasp-views-keyfile-race' into 'main'

Lock key files when looking for zone keys

Closes #1875

See merge request isc-projects/bind9!4919

5 years agoRelease notes and changes for [#1875]
Matthijs Mekking [Fri, 16 Apr 2021 06:39:40 +0000 (08:39 +0200)] 
Release notes and changes for [#1875]

5 years agoLock kasp when looking for zone keys
Matthijs Mekking [Mon, 19 Apr 2021 14:32:40 +0000 (16:32 +0200)] 
Lock kasp when looking for zone keys

We should also lock kasp when reading key files, because at the same
time the zone in another view may be updating the key file.

5 years agoMerge branch 'mnowak/openbsd-6.9' into 'main'
Michal Nowak [Wed, 19 May 2021 17:10:53 +0000 (17:10 +0000)] 
Merge branch 'mnowak/openbsd-6.9' into 'main'

Add OpenBSD 6.9

See merge request isc-projects/bind9!5031

5 years agoAdd OpenBSD 6.9
Michal Nowak [Mon, 17 May 2021 10:02:31 +0000 (12:02 +0200)] 
Add OpenBSD 6.9

5 years agoMerge branch '2694-drop-seq-command-from-views-tests-sh' into 'main'
Michal Nowak [Wed, 19 May 2021 13:55:53 +0000 (13:55 +0000)] 
Merge branch '2694-drop-seq-command-from-views-tests-sh' into 'main'

Replace seq command with POSIX-compliant shell code

Closes #2694

See merge request isc-projects/bind9!5061

5 years agoMake views system test ShellCheck-clean
Michal Nowak [Wed, 19 May 2021 10:38:33 +0000 (12:38 +0200)] 
Make views system test ShellCheck-clean

Also, add "set -e" to all shell scripts of the views test to exit when
any command fails or is unknown, e.g., this on OpenBSD:

    tests.sh[174]: seq: not found

5 years agoReplace seq command with POSIX-compliant shell code
Michal Nowak [Wed, 19 May 2021 10:33:16 +0000 (12:33 +0200)] 
Replace seq command with POSIX-compliant shell code

The seq command is not defined in the POSIX standard and is missing on
OpenBSD. Given that the system test code is meant to be POSIX-compliant
replace it with a shell construct.

5 years agoMerge branch '2709-placeholder' into 'main'
Michał Kępień [Wed, 19 May 2021 12:00:02 +0000 (12:00 +0000)] 
Merge branch '2709-placeholder' into 'main'

Add placeholder for GL #2709

See merge request isc-projects/bind9!5060

5 years agoAdd placeholder for GL #2709
Michał Kępień [Wed, 19 May 2021 11:57:21 +0000 (13:57 +0200)] 
Add placeholder for GL #2709

5 years agoMerge branch 'artem/doh-quota-tests' into 'main'
Artem Boldariev [Wed, 19 May 2021 08:30:17 +0000 (08:30 +0000)] 
Merge branch 'artem/doh-quota-tests' into 'main'

Add DoH quota tests

See merge request isc-projects/bind9!5024

5 years agoAdd DoH quota tests
Artem Boldariev [Fri, 14 May 2021 08:50:33 +0000 (11:50 +0300)] 
Add DoH quota tests

This commit adds unit tests which ensure that DoH code is compatible
with quota functionality.

5 years agoMerge branch '2688-cid331478-forwardnull' into 'main'
Mark Andrews [Wed, 19 May 2021 01:55:53 +0000 (01:55 +0000)] 
Merge branch '2688-cid331478-forwardnull' into 'main'

Fix possible null dereference (coverity issue 331478)

Closes #2688

See merge request isc-projects/bind9!5034

5 years agoFix coverity issue 331478
Matthijs Mekking [Mon, 17 May 2021 12:06:46 +0000 (14:06 +0200)] 
Fix coverity issue 331478

Move the "cannot start rollover" warning into code block that checks
if 'active_key' is not NULL.

5 years agoMerge branch '2550-remove-dns_zone_setflag' into 'main'
Mark Andrews [Tue, 18 May 2021 23:54:35 +0000 (23:54 +0000)] 
Merge branch '2550-remove-dns_zone_setflag' into 'main'

Resolve "Remove dns_zone_setflag"

Closes #2550

See merge request isc-projects/bind9!4762

5 years agoRemove dns_zone_setflag()
Mark Andrews [Thu, 4 Mar 2021 01:35:11 +0000 (12:35 +1100)] 
Remove dns_zone_setflag()

This function has never been used since it was added to the source tree
by commit 686b27bfd3ef906721fad485e3dae759679890b7 back in 1999.  As
the dns_zoneflg_t type is only defined in lib/dns/zone.c, no function
external to that file would be able to use dns_zone_setflag() properly
anyway - the DNS_ZONE_SETFLAG() and DNS_ZONE_CLRFLAG() macros should be
used instead. Zone options that can be set from outside zone.c are set
using dns_zone_setoption().

5 years agoMerge branch '2463-kasp-views-different-policy-same-keydirectory' into 'main'
Matthijs Mekking [Tue, 18 May 2021 14:40:26 +0000 (14:40 +0000)] 
Merge branch '2463-kasp-views-different-policy-same-keydirectory' into 'main'

Check key-directory duplicates for kasp zones

Closes #2463

See merge request isc-projects/bind9!4989

5 years agoRelease notes and changes for [GL #2463]
Matthijs Mekking [Tue, 4 May 2021 14:43:40 +0000 (16:43 +0200)] 
Release notes and changes for [GL #2463]

Mention the bugfix.

5 years agoAdd checkconf tests for [#2463]
Matthijs Mekking [Tue, 4 May 2021 14:30:17 +0000 (16:30 +0200)] 
Add checkconf tests for [#2463]

Add two tests to make sure named-checkconf catches key-directory issues
where a zone in multiple views uses the same directory but has
different dnssec-policies. One test sets the key-directory specifically,
the other inherits the default key-directory (NULL, aka the working
directory).

Also update the good.conf test to allow zones in different views
with the same key-directory if they use the same dnssec-policy.

Also allow zones in different views with different key-directories if
they use different dnssec-policies.

Also allow zones in different views with the same key-directories if
only one view uses a dnssec-policy (the other is set to "none").

Also allow zones in different views with the same key-directories if
no views uses a dnssec-policy (zone in both views has the dnssec-policy
set to "none").

5 years agoCheck key-directory duplicates for kasp zones
Matthijs Mekking [Tue, 4 May 2021 13:35:39 +0000 (15:35 +0200)] 
Check key-directory duplicates for kasp zones

Don't allow the same zone with different dnssec-policies in separate
views have the same key-directory.

Track zones plus key-directory in a symtab and if there is a match,
check the offending zone's dnssec-policy name. If the name is "none"
(there is no kasp for the offending zone), or if the name is the same
(the zone shares keys), it is fine, otherwise it is an error (zones
in views using different policies cannot share the same key-directory).

5 years agoMerge branch '2696-misleading-diagnostic-in-update_soa_serial-indicates-bind-will...
Mark Andrews [Tue, 18 May 2021 12:51:00 +0000 (12:51 +0000)] 
Merge branch '2696-misleading-diagnostic-in-update_soa_serial-indicates-bind-will-use-increment-but-it-doesn-t' into 'main'

Resolve "Misleading diagnostic in update_soa_serial indicates BIND will use increment but it doesn't"

Closes #2696

See merge request isc-projects/bind9!5029

5 years agoAdjust returned method from dns_updatemethod_date
Mark Andrews [Mon, 17 May 2021 03:32:26 +0000 (13:32 +1000)] 
Adjust returned method from dns_updatemethod_date

if dns_updatemethod_date is used do that the returned method is only
set to dns_updatemethod_increment if the new serial does not encode
the current day (YYYYMMDDXX).

5 years agoMerge branch 'michal/use-context-managers-as-suggested-by-pylint-2.8.2' into 'main'
Michał Kępień [Tue, 18 May 2021 08:56:50 +0000 (08:56 +0000)] 
Merge branch 'michal/use-context-managers-as-suggested-by-pylint-2.8.2' into 'main'

Use context managers as suggested by PyLint 2.8.2

See merge request isc-projects/bind9!5041

5 years agoUse context managers as suggested by PyLint 2.8.2
Michał Kępień [Tue, 18 May 2021 08:53:17 +0000 (10:53 +0200)] 
Use context managers as suggested by PyLint 2.8.2

PyLint 2.8.2 reports the following suggestions for two Python scripts
used in the system test suite:

    ************* Module tests_rndc_deadlock
    bin/tests/system/addzone/tests_rndc_deadlock.py:71:4: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
    ************* Module tests-shutdown
    bin/tests/system/shutdown/tests-shutdown.py:68:4: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
    bin/tests/system/shutdown/tests-shutdown.py:154:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

Implement the above suggestions by using
concurrent.futures.ThreadPoolExecutor() and subprocess.Popen() as
context managers.

5 years agoMerge branch '2706-worker-cond_prio-needs-to-be-initialised' into 'main'
Mark Andrews [Tue, 18 May 2021 08:39:28 +0000 (08:39 +0000)] 
Merge branch '2706-worker-cond_prio-needs-to-be-initialised' into 'main'

Resolve "worker->cond_prio needs to be initialised"

Closes #2706

See merge request isc-projects/bind9!5048

5 years agoinitialise worker->cond_prio
Mark Andrews [Tue, 18 May 2021 06:34:52 +0000 (16:34 +1000)] 
initialise worker->cond_prio

5 years agoMerge branch '2701-gcc-10-fanalyzer-reports-dereference-of-null-label-in-lib-dns...
Mark Andrews [Tue, 18 May 2021 06:41:56 +0000 (06:41 +0000)] 
Merge branch '2701-gcc-10-fanalyzer-reports-dereference-of-null-label-in-lib-dns-name-c-1167' into 'main'

Resolve "gcc-10+ -fanalyzer reports: dereference of NULL ‘label’ in lib/dns/name.c:1167"

Closes #2701

See merge request isc-projects/bind9!5046

5 years agoSilence gcc-10-fanalyzer false positive
Mark Andrews [Tue, 18 May 2021 05:51:51 +0000 (15:51 +1000)] 
Silence gcc-10-fanalyzer false positive

If 'state == ft_ordinary' then 'label' can't be NULL. Add
INSIST to reflect this.

5 years agoMerge branch '2702-gcc-10-fanalyzer-reports' into 'main'
Mark Andrews [Tue, 18 May 2021 05:45:26 +0000 (05:45 +0000)] 
Merge branch '2702-gcc-10-fanalyzer-reports' into 'main'

Resolve "gcc-10+ -fanalyzer reports:"

Closes #2702

See merge request isc-projects/bind9!5043

5 years agoSilence gcc-10-fanalyzer false positive
Mark Andrews [Tue, 18 May 2021 05:19:28 +0000 (15:19 +1000)] 
Silence gcc-10-fanalyzer false positive

Add REQUIRE(type == dns_rdatatype_nsec3 || firstp != NULL); so
that dereferences of *firstp is not flagged as a NULL pointer
dereference.

5 years agoMerge branch '2689-cid-331477-resource-leaks-resource_leak' into 'main'
Mark Andrews [Tue, 18 May 2021 00:53:38 +0000 (00:53 +0000)] 
Merge branch '2689-cid-331477-resource-leaks-resource_leak' into 'main'

Resolve "CID 331477: Resource leaks (RESOURCE_LEAK)"

Closes #2689

See merge request isc-projects/bind9!5016

5 years agoAdd CHANGES for [GL #2689]
Mark Andrews [Thu, 13 May 2021 06:50:39 +0000 (16:50 +1000)] 
Add CHANGES for [GL #2689]

5 years agoAddress potential resource leak in dst_key_fromnamedfile
Mark Andrews [Thu, 13 May 2021 06:33:49 +0000 (16:33 +1000)] 
Address potential resource leak in dst_key_fromnamedfile

5 years agoMerge branch 'each-bufsize-doc' into 'main'
Evan Hunt [Mon, 17 May 2021 17:02:18 +0000 (17:02 +0000)] 
Merge branch 'each-bufsize-doc' into 'main'

clarify buffer size options

See merge request isc-projects/bind9!5037

5 years agoclarify buffer size options
Evan Hunt [Mon, 17 May 2021 16:34:08 +0000 (09:34 -0700)] 
clarify buffer size options

the documentation for {udp,tcp}-{send,receive}-buffer options
was not complete. also revised for grammar.

5 years agoMerge branch 'michal/tweak-cve-handling-checklists' into 'main'
Michał Kępień [Mon, 17 May 2021 12:09:44 +0000 (12:09 +0000)] 
Merge branch 'michal/tweak-cve-handling-checklists' into 'main'

Tweak security incident handling checklists

See merge request isc-projects/bind9!5017

5 years agoTweak security incident handling checklists
Michał Kępień [Mon, 17 May 2021 12:07:27 +0000 (14:07 +0200)] 
Tweak security incident handling checklists

Add an item to the CVE issue template which calls for drafting the
security advisory early in the security incident handling process.  The
intention is to ensure there is enough time to review and polish ISC
security advisories before they get published.

Tweak the release checklist to make sure we carefully consider all
confidential issues before opening them up to the public.  This change
is intended as a safeguard against accidentally disclosing too much
information about a security vulnerability before our users get a chance
to patch it.

5 years agoMerge branch 'ondrej/remove-netmgr-quantum' into 'main'
Ondřej Surý [Mon, 17 May 2021 10:05:11 +0000 (10:05 +0000)] 
Merge branch 'ondrej/remove-netmgr-quantum' into 'main'

Replace netmgr quantum with loop-preventing barrier

See merge request isc-projects/bind9!5028

5 years agoReplace netmgr quantum with loop-preventing barrier
Ondřej Surý [Fri, 7 May 2021 10:58:40 +0000 (12:58 +0200)] 
Replace netmgr quantum with loop-preventing barrier

Instead of using fixed quantum, this commit adds atomic counter for
number of items on each queue and uses the number of netievents
scheduled to run as the limit of maximum number of netievents for a
single process_queue() run.

This prevents the endless loops when the netievent would schedule more
netievents onto the same loop, but we don't have to pick "magic" number
for the quantum.

5 years agoMerge branch '2693-add-py-test-to-the-list-of-tested-pytest-names' into 'main'
Michal Nowak [Mon, 17 May 2021 09:23:25 +0000 (09:23 +0000)] 
Merge branch '2693-add-py-test-to-the-list-of-tested-pytest-names' into 'main'

Add py.test to the list of tested pytest names

Closes #2693

See merge request isc-projects/bind9!5022

5 years agoAdd py.test to the list of tested pytest names
Michal Nowak [Thu, 13 May 2021 15:24:57 +0000 (17:24 +0200)] 
Add py.test to the list of tested pytest names

OpenBSD changed the name of the pytest script from py.test-3 in OpenBSD
6.8 to py.test in OpenBSD 6.9.

The py.test-3 name which was added in d5562a3e for the sake of OpenBSD
and CentOS is still required for CentOS.

5 years agoMerge branch '2313-set-RCVBUF-SNDBUF' into 'main'
Ondřej Surý [Mon, 17 May 2021 07:42:37 +0000 (07:42 +0000)] 
Merge branch '2313-set-RCVBUF-SNDBUF' into 'main'

Resolve "Set reasonable values to SO_RCVBUF and SO_SNDBUF"

Closes #2313

See merge request isc-projects/bind9!4460

5 years agoAdd CHANGES and release note for GL #2313
Ondřej Surý [Mon, 15 Mar 2021 14:55:44 +0000 (15:55 +0100)] 
Add CHANGES and release note for GL #2313

5 years agoAdd configuration option to set send/recv buffers on the nm sockets
Ondřej Surý [Wed, 2 Dec 2020 19:51:38 +0000 (20:51 +0100)] 
Add configuration option to set send/recv buffers on the nm sockets

This commit adds a new configuration option to set the receive and send
buffer sizes on the TCP and UDP netmgr sockets.  The default is `0`
which doesn't set any value and just uses the value set by the operating
system.

There's no magic value here - set it too small and the performance will
drop, set it too large, the buffers can fill-up with queries that have
already timeouted on the client side and nobody is interested for the
answer and this would just make the server clog up even more by making
it produce useless work.

The `netstat -su` can be used on POSIX systems to monitor the receive
and send buffer errors.

5 years agoMerge branch '2386-check-correct-copyright-dates-in-man-pages' into 'main'
Michal Nowak [Fri, 14 May 2021 12:46:33 +0000 (12:46 +0000)] 
Merge branch '2386-check-correct-copyright-dates-in-man-pages' into 'main'

Set copyright year to the current year

Closes #2386

See merge request isc-projects/bind9!4869

5 years agoSet copyright year to the current year
Michal Nowak [Wed, 7 Apr 2021 14:42:28 +0000 (16:42 +0200)] 
Set copyright year to the current year

To ensure that a release with outdated copyright year is not produced at
the beginning of a year, set copyright year to the current year.

5 years agoMerge branch 'mnowak/add-unit-gcc-out-of-tree-ci-job' into 'main'
Michal Nowak [Fri, 14 May 2021 12:21:06 +0000 (12:21 +0000)] 
Merge branch 'mnowak/add-unit-gcc-out-of-tree-ci-job' into 'main'

Add unit:gcc:out-of-tree CI job

See merge request isc-projects/bind9!4740

5 years agoAdd unit:gcc:out-of-tree CI job
Michal Nowak [Wed, 24 Feb 2021 11:15:59 +0000 (12:15 +0100)] 
Add unit:gcc:out-of-tree CI job

Also extract the workspace save-and-retrieve logic to YAML anchors.

5 years agoMake masterXX.data.in reachable by out-of-tree builds
Michal Nowak [Fri, 11 Sep 2020 07:07:04 +0000 (09:07 +0200)] 
Make masterXX.data.in reachable by out-of-tree builds

Unit test run for out-of-tree builds used to fail to find
masterXX.data.in files:

    /usr/bin/perl -w /builds/mnowak/bind9/lib/dns/tests/mkraw.pl < testdata/master/master12.data.in > testdata/master/master12.data
    /bin/bash: testdata/master/master12.data.in: No such file or directory
    make[4]: *** [Makefile:1910: testdata/master/master12.data] Error 1

5 years agoMerge branch 'ondrej/fix-outgoing-udp-socket-selection-on-windows' into 'main'
Ondřej Surý [Thu, 13 May 2021 14:05:22 +0000 (14:05 +0000)] 
Merge branch 'ondrej/fix-outgoing-udp-socket-selection-on-windows' into 'main'

Fix the outgoing UDP socket selection on Windows

See merge request isc-projects/bind9!5021

5 years agoFix the outgoing UDP socket selection on Windows
Ondřej Surý [Thu, 13 May 2021 13:04:48 +0000 (15:04 +0200)] 
Fix the outgoing UDP socket selection on Windows

The outgoing UDP socket selection would pick unintialized children
socket on Windows, because we have more netmgr workers than we have
listening sockets.  This commit fixes the selection by keeping the
outgoing socket the same, so it's always run on existing socket.

5 years agoMerge branch 'artem-flamethrower-fixes' into 'main'
Artem Boldariev [Thu, 13 May 2021 10:01:26 +0000 (10:01 +0000)] 
Merge branch 'artem-flamethrower-fixes' into 'main'

DoH flamethrower fixes

See merge request isc-projects/bind9!5019

5 years agoFix DoH unit tests logic
Artem Boldariev [Wed, 12 May 2021 16:28:29 +0000 (19:28 +0300)] 
Fix DoH unit tests logic

This commit fixes logic bugs in DoH test suite revealed by making DoH
not to call nghttp2_session_terminate_session() in server-side code.

5 years agoFix crash in TLS caused by improper handling of shutdown messages
Artem Boldariev [Wed, 12 May 2021 11:39:24 +0000 (14:39 +0300)] 
Fix crash in TLS caused by improper handling of shutdown messages

The problem was found when flamethrower was accidentally run in DoT
mode against DoH port.

5 years agoLimit the number of active concurrent HTTP/2 streams
Artem Boldariev [Wed, 12 May 2021 09:12:21 +0000 (12:12 +0300)] 
Limit the number of active concurrent HTTP/2 streams

The initial intent was to limit the number of concurrent streams by
the value of 100 but due to the error when reading the documentation
it was set to the maximum possible number of streams per session.

This could lead to security issues, e.g. a remote attacker could have
taken down the BIND instance by creating lots of sessions via low
number of transport connections. This commit fixes that.

5 years agoDo not allow empty DoH endpoints to be added
Artem Boldariev [Wed, 12 May 2021 08:53:35 +0000 (11:53 +0300)] 
Do not allow empty DoH endpoints to be added

It was possible to specify empty DoH endpoint in BIND's configuration
file: that was an error, we should not allow doing so.

5 years agoDo not call nghttp2_session_terminate_session() in server-side code
Artem Boldariev [Wed, 12 May 2021 08:48:13 +0000 (11:48 +0300)] 
Do not call nghttp2_session_terminate_session() in server-side code

We should not call nghttp2_session_terminate_session() in server-side
code after all of the active HTTP/2 streams are processed. The
underlying transport connection is expected to remain opened at least
for some time in this case for new HTTP/2 requests to arrive. That is
what flamethrower was expecting and it makes perfect sense from the
HTTP/2 perspective.

5 years agoMerge branch '2528-check-soa-rdata' into 'main'
Mark Andrews [Thu, 13 May 2021 05:17:39 +0000 (05:17 +0000)] 
Merge branch '2528-check-soa-rdata' into 'main'

Check SOA rdata for consistency in AXFR.

Closes #2528

See merge request isc-projects/bind9!5014

5 years agosystem test
Evan Hunt [Sat, 8 May 2021 17:53:09 +0000 (10:53 -0700)] 
system test

Attempt a zone transfer with mismatched SOA records.

5 years agoAdd CHANGES entry for [GL #2528]
Mark Andrews [Mon, 15 Mar 2021 04:47:39 +0000 (15:47 +1100)] 
Add CHANGES entry for [GL #2528]

5 years agoCheck that the first and last SOA of an AXFR are consistent
Mark Andrews [Mon, 15 Mar 2021 04:43:26 +0000 (15:43 +1100)] 
Check that the first and last SOA of an AXFR are consistent

5 years agoMerge branch '2656-resolver-system-test-fails-on-macos' into 'main'
Mark Andrews [Wed, 12 May 2021 03:40:52 +0000 (03:40 +0000)] 
Merge branch '2656-resolver-system-test-fails-on-macos' into 'main'

Resolve "resolver system test fails on macOS"

Closes #2656

See merge request isc-projects/bind9!4947

5 years agoAdd missing call to isc_app_ctxstart
Mark Andrews [Thu, 6 May 2021 00:23:54 +0000 (10:23 +1000)] 
Add missing call to isc_app_ctxstart

5 years agoMerge branch 'marka/add-missing-isc_condition_init' into 'main'
Ondřej Surý [Tue, 11 May 2021 13:03:13 +0000 (13:03 +0000)] 
Merge branch 'marka/add-missing-isc_condition_init' into 'main'

initalise sock->cond

See merge request isc-projects/bind9!5013

5 years agoinitalise sock->cond
Mark Andrews [Tue, 11 May 2021 04:01:37 +0000 (14:01 +1000)] 
initalise sock->cond

5 years agoMerge branch 'ondrej/increase-netmgr-quantum' into 'main'
Ondřej Surý [Mon, 10 May 2021 20:04:10 +0000 (20:04 +0000)] 
Merge branch 'ondrej/increase-netmgr-quantum' into 'main'

Bump the netmgr quantum to 1024

See merge request isc-projects/bind9!5009

5 years agoBump the netmgr quantum to 1024
Ondřej Surý [Mon, 10 May 2021 13:13:46 +0000 (15:13 +0200)] 
Bump the netmgr quantum to 1024

During the stress testing, it was discovered that the default netmgr
quantum of 128 is not enough and there was a performance drop for TCP on
FreeBSD.  Bumping the default quantum to 1024 solves the performance
issue and is still enough to prevent the endless loops.

5 years agoMerge branch 'each-taskmgr-setmode' into 'main'
Evan Hunt [Mon, 10 May 2021 19:32:00 +0000 (19:32 +0000)] 
Merge branch 'each-taskmgr-setmode' into 'main'

reset taskmgr immediately after loading zones

See merge request isc-projects/bind9!5010

5 years agoreset taskmgr mode immediately after returning from zone load
Evan Hunt [Sat, 8 May 2021 19:01:45 +0000 (12:01 -0700)] 
reset taskmgr mode immediately after returning from zone load

all privileged tasks are complete by the time we return from
isc_task_endexclusive(), so it makes sense to reset the taskmgr
mode to non-privileged right then.

5 years agoMerge branch 'ondrej/dereference-taskmgr-after-all-tasks-are-done' into 'main'
Ondřej Surý [Mon, 10 May 2021 19:24:53 +0000 (19:24 +0000)] 
Merge branch 'ondrej/dereference-taskmgr-after-all-tasks-are-done' into 'main'

Destroy reference to taskmgr after all tasks are done

See merge request isc-projects/bind9!5008

5 years agoDestroy reference to taskmgr after all tasks are done
Ondřej Surý [Mon, 10 May 2021 12:11:25 +0000 (14:11 +0200)] 
Destroy reference to taskmgr after all tasks are done

We were clearing the pointer to taskmgr as soon as isc_taskmgr_destroy()
would be called and before all tasks were finished.  Unfortunately, some
tasks would use global named_g_taskmgr objects from inside the events
and this would cause either a data race or NULL pointer dereference.

This commit fixes the data race by moving the destruction of the
referenced pointer to the time after all tasks are finished.

5 years agoMerge branch 'ondrej/fix-missing-isc_taskmgr_detach-on-exiting' into 'main'
Ondřej Surý [Mon, 10 May 2021 11:33:46 +0000 (11:33 +0000)] 
Merge branch 'ondrej/fix-missing-isc_taskmgr_detach-on-exiting' into 'main'

Add isc_taskmgr_detach when task is created while shutting down

See merge request isc-projects/bind9!5006

5 years agoAdd isc_taskmgr_detach when task is created while shutting down
Ondřej Surý [Mon, 10 May 2021 09:36:54 +0000 (11:36 +0200)] 
Add isc_taskmgr_detach when task is created while shutting down

When taskmgr is shutting down, the creating the task would attach
to the taskmgr, but don't detach on error condition.

5 years agoMerge branch '2654-create-isc_managers-api' into 'main'
Evan Hunt [Fri, 7 May 2021 21:37:01 +0000 (21:37 +0000)] 
Merge branch '2654-create-isc_managers-api' into 'main'

Destroy netmgr before destroying taskmgr

Closes #2654

See merge request isc-projects/bind9!4983

5 years agoCHANGES
Evan Hunt [Fri, 7 May 2021 18:32:21 +0000 (11:32 -0700)] 
CHANGES

5 years agoimprovements to socket_test
Ondřej Surý [Fri, 7 May 2021 13:34:22 +0000 (15:34 +0200)] 
improvements to socket_test

- be more strict, but patient, waiting for event completion.
- use an atomic pointer for the socket to silence TSAN warnings.