Commit Graph

33261 Commits

Author SHA1 Message Date
Ondřej Surý
1f44bb5ab1 Merge branch '2708-named-doesn-t-compile-with-gcc-10-v9_16' into 'v9_16'
Remove priority from attribute constructor/destructor

See merge request isc-projects/bind9!5104
2021-05-27 12:55:17 +00:00
Mark Andrews
0340df46ec Remove priority from attribute constructor/destructor
On some platforms, the __attribute__ constructor and destructor won't
take priorities and the compilation failed.  On such platform would be
macOS.  For this reason, the constructor/destructor in the libisc was
reworked to not use priorities, but have a single constructor and
destructor that calls the appropriate routines in correct order.

This commit removes the extra priority because it's now not needed and
it also breaks a compilation on macOS with GCC 10.

(cherry picked from commit d68b009cfe)
2021-05-27 08:26:20 +02:00
Mark Andrews
8f63856d4c Merge branch '2282-shutdown-system-test-needs-to-be-tweaked-to-account-for-recent-netmgr-changes-v9_16' into 'v9_16'
Handling NoNameservers exception

See merge request isc-projects/bind9!5103
2021-05-27 03:35:21 +00:00
Diego Fronza
65f90f2927 Handling NoNameservers exception
In the shutdown system test multiple queries are sent to a resolver
instance, in the meantime we terminate the same resolver process for
which the queries were sent to, either via rndc stop or a SIGTERM
signal, that means the resolver may not be able to answer all those
queries, since it has initiated the shutdown process.

The dnspython library raises a dns.resolver.NoNameservers exception when
a resolver object fails to receive an answer from the specified list
of nameservers (resolver.nameservers list), we need to handle this
exception as this is something that may happen since we asked the
resolver to terminate, as a result it may not answer clients even if
an answer is available, as the operation will be canceled.

(cherry picked from commit b19cd2d83b)
2021-05-27 12:58:55 +10:00
Ondřej Surý
622e6e604d Merge branch 'marka-missing-initialisations-v9_16' into 'v9_16'
Add missing initialisations (v9.16)

See merge request isc-projects/bind9!5101
2021-05-26 15:53:06 +00:00
Mark Andrews
9694554b88 Add missing initialisations
configuring with --enable-mutex-atomics flagged these incorrectly
initialised variables on systems where pthread_mutex_init doesn't
just zero out the structure.

(cherry picked from commit 715a2c7fc1)
2021-05-26 17:19:06 +02:00
Ondřej Surý
81b9c5bc10 Merge branch 'ondrej/require-cmocka-1.1.3-v9_16' into 'v9_16'
Require CMocka >= 1.1.3 to run the unit tests

See merge request isc-projects/bind9!5099
2021-05-26 14:20:52 +00:00
Ondřej Surý
935a5e2095 Require CMocka >= 1.1.3 to run the unit tests
In CMocka versions << 1.1.3, the skip() function would cause the whole
unit test to abort when CMOCKA_TEST_ABORT is set.  As this is problem
only in Debian 9 Stretch and Ubuntu 16.04 Xenial, we just require the
CMocka >= 1.1.3 and disable the unit testing on Debian 9 Stretch until
we can pull the libcmocka-dev from stretch-backports and remove the
Ubuntu 16.04 Xenial from the CI as it is reaching End of Standard
Support at the end of April 2021.
2021-05-26 16:13:20 +02:00
Ondřej Surý
283ccc232f Merge branch '2721-shutdown-race-in-interfacemgr-v9_16' into 'v9_16'
Refactor the interface handling in the netmgr (v9.16)

See merge request isc-projects/bind9!5095
2021-05-26 08:55:43 +00:00
Ondřej Surý
b009b3c50c Refactor the interface handling in the netmgr
The isc_nmiface_t type was holding just a single isc_sockaddr_t,
so we got rid of the datatype and use plain isc_sockaddr_t in place
where isc_nmiface_t was used before.  This means less type-casting and
shorter path to access isc_sockaddr_t members.

At the same time, instead of keeping the reference to the isc_sockaddr_t
that was passed to us when we start listening, we will keep a local
copy. This prevents the data race on destruction of the ns_interface_t
objects where pending nmsockets could reference the sockaddr of already
destroyed ns_interface_t object.

(cherry picked from commit 50270de8a0)
2021-05-26 10:09:47 +02:00
Mark Andrews
1004eb884d Merge branch '2685-max-ixfr-ratio-appears-to-be-forcing-axfr-very-prematurely-on-bind-9-16-15-v9_16' into 'v9_16'
Correct size calculation in dns_journal_iter_init()

See merge request isc-projects/bind9!5093
2021-05-26 00:52:56 +00:00
Mark Andrews
f6fd4ec407 Add release note for [GL #2685]
(cherry picked from commit 80ca95a95c)
2021-05-26 08:54:27 +10:00
Mark Andrews
8389380bde Add CHANGES note for [GL #2685]
(cherry picked from commit d99c312938)
2021-05-26 08:50:19 +10:00
Mark Andrews
564ab69c57 Consolidate xhdr fixups
(cherry picked from commit 0a45af2e2f)
2021-05-26 08:49:30 +10:00
Mark Andrews
264b31e786 Check that IXFR delta size is correct
(cherry picked from commit 68d203ff1c)
2021-05-26 08:49:30 +10:00
Mark Andrews
d832062986 Correct size calculation in dns_journal_iter_init()
* dns_journal_next() leaves the read point in the journal after the
transaction header so journal_seek() should be inside the loop.
* we need to recover from transaction header inconsistencies

Additionally when correcting for <size, serial0, serial1, 0> the
correct consistency check is isc_serial_gt() rather than
isc_serial_ge().  All instances updated.

(cherry picked from commit 00609f5094)
2021-05-26 08:49:30 +10:00
Michal Nowak
98de7363e7 Merge branch 'mnowak/install-bind-by-setting-DESTDIR-v9_16' into 'v9_16'
[v9_16] Install BIND with "make DESTDIR=<PATH> install"

See merge request isc-projects/bind9!5091
2021-05-25 16:39:41 +00:00
Michal Nowak
d3aa8f4f5a Install BIND with "make DESTDIR=<PATH> install"
BIND installation should be done by setting DESTDIR during "make
install" not by setting prefix via ./configure.

Make sure that installation with DESTDIR=<PATH> works by checking that
named binary and it's respective man page were installed and that
well-known BIND9 directories - and only them - are present in DESTDIR.

Also rename install path variable from BIND_INSTALL_PATH to
INSTALL_PATH to avoid namespace clash in stress tests which use
BIND_INSTALL_PATH variable to configure path to BIND9 binaries.

(cherry picked from commit 823bf3e79b)
2021-05-25 12:03:34 +02:00
Ondřej Surý
1bb7963bbb Merge branch 'ondrej/replace-ubuntu-xenial-with-ubuntu-bionic-v9_16' into 'v9_16'
Replace Ubuntu 16.04 LTS with Ubuntu 18.04 LTS in the GitLab CI (v9.16)

See merge request isc-projects/bind9!5088
2021-05-24 20:22:21 +00:00
Ondřej Surý
e1725d75c3 Replace Ubuntu 16.04 LTS with Ubuntu 18.04 LTS in the GitLab CI
Ubuntu 16.04 (Xenial Xerus) is reaching End of Standard Support in April
2021 thus we are removing it from the list of supported platforms and
replacing it with Ubuntu 18.04 LTS (Bionic Beaver).

(cherry picked from commit 4402a90bb7)
2021-05-24 21:53:57 +02:00
Michal Nowak
4f60a8f06f Merge branch 'mnowak/freebsd-13-v9_16' into 'v9_16'
[v9_16] Add FreeBSD 13.0

See merge request isc-projects/bind9!5086
2021-05-24 18:17:42 +00:00
Michal Nowak
0c3e2e6c42 Run gcc:tarball CI job for merge requests
Running gcc:tarball CI job for merge requests is consistent with how we
run gcc:out-of-tree CI job and should help identify problems with the
build system during the review process, not once merged during daily
runs. For the sake of time, unit and system tests associated with the
gcc:tarball CI job are excluded from merge requests.

Also, make sure that the tarball-create CI job includes the
default_triggering_rules anchor (as it is on the main branch), otherwise
adding the gcc:tarball CI job to merge request-triggered pipeline fails
with:

    Found errors in your .gitlab-ci.yml: 'gcc:tarball' job needs 'tarball-create' job but it was not added to the pipeline

(cherry picked from commit 83617cea9a)
2021-05-24 19:29:23 +02:00
Michal Nowak
582d7fc860 Do not spawn FreeBSD 11 CI jobs in merge requests
(cherry picked from commit 70eccd2952)
2021-05-24 18:37:37 +02:00
Michal Nowak
a496ab42f1 Create an anchor for schedules, tags, and web rules
It's a common pattern to spawn CI jobs only for pipelines triggered by
schedules, tags, and web. There should be an anchor so that the rules
are not repeated.

(cherry picked from commit e4f88c359c)
2021-05-24 18:22:52 +02:00
Michal Nowak
ddf03eb546 Add FreeBSD 13.0
(cherry picked from commit 0714fe6f40)
2021-05-24 18:18:44 +02:00
Ondřej Surý
a5f92c9d99 Merge branch '2713-intermittent-crashes-in-the-tkey-system-test-caused-by-broken-dns_name_t-structures-v9_16' into 'v9_16'
Use dns_name_copynf() with dns_message_gettempname() when needed

See merge request isc-projects/bind9!5083
2021-05-22 05:42:08 +00:00
Ondřej Surý
ac25fb9439 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.

(cherry picked from commit ce3e1abc1d)
2021-05-22 07:17:01 +02:00
Ondřej Surý
f470e46db0 Merge branch '2515-improve-glue-cache-performance-v9_16' into 'v9_16'
use a fixedname buffer in dns_message_gettempname()

See merge request isc-projects/bind9!5072
2021-05-22 05:15:01 +00:00
Ondřej Surý
9f13e61041 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.

(cherry picked from commit 5ee9edc4ce)
2021-05-22 07:13:57 +02:00
Evan Hunt
dccdb492ef 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.

(cherry picked from commit e31cc1eeb4)
2021-05-22 07:13:57 +02:00
Michał Kępień
a8582b8f8f Merge branch 'michal/regenerate-man-pages-with-sphinx-4.0.2-v9_16' into 'v9_16'
[v9_16] Regenerate man pages with Sphinx 4.0.2

See merge request isc-projects/bind9!5078
2021-05-21 09:37:26 +00:00
Michał Kępień
f27685f0d3 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.

(cherry picked from commit 9ec83d1f63)
2021-05-21 11:27:32 +02:00
Michał Kępień
070c5fff49 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.

(cherry picked from commit bdb777b2a2)
2021-05-21 11:27:32 +02:00
Michał Kępień
f2c0dfdc19 Merge branch 'v9_16_16-release' into 'v9_16'
Merge 9.16.16 release branch

See merge request isc-projects/bind9!5069
2021-05-20 10:29:48 +00:00
Michał Kępień
2082566018 Set up release notes for BIND 9.16.17 2021-05-20 12:24:21 +02:00
Tinderbox User
57dad292ae Merge branch 'prep-release' into v9_16_16-release 2021-05-20 12:24:21 +02:00
Michał Kępień
2d7ec0c23b Merge branch 'mnowak/prepare-documentation-for-bind-9.16.16' into 'v9_16_16-release'
Prepare documentation for BIND 9.16.16

See merge request isc-private/bind9!294
2021-05-20 12:24:21 +02:00
Tinderbox User
2427e53d97 prep 9.16.16 2021-05-20 12:24:21 +02:00
Michał Kępień
cc503db304 Prepare release notes for BIND 9.16.16 2021-05-20 12:24:21 +02:00
Michał Kępień
6c144f38d9 Add release note for GL #2626 2021-05-20 12:24:21 +02:00
Michał Kępień
22d7ba6d11 Reorder release notes 2021-05-20 12:24:21 +02:00
Michał Kępień
f853ea9b15 Tweak and reword release notes 2021-05-20 12:24:21 +02:00
Michał Kępień
bf54e20580 Tweak and reword recent CHANGES entries 2021-05-20 12:24:21 +02:00
Michal Nowak
d0a0e7ad18 Fix typo in doc/dnssec-guide/recipes.rst 2021-05-20 12:24:21 +02:00
Matthijs Mekking
cc5bd7f1f5 Merge branch '1875-kasp-views-keyfile-race-v9_16' into 'v9_16'
Lock kasp when looking for zone keys (9.16)

See merge request isc-projects/bind9!5067
2021-05-20 08:21:29 +00:00
Matthijs Mekking
01f9b6e9c4 Release notes and changes for [#1875]
(cherry picked from commit fa1cd0a1f1)
2021-05-20 09:53:32 +02:00
Matthijs Mekking
96be6473fc 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.

(cherry picked from commit 252a1ae0a1)
2021-05-20 09:52:53 +02:00
Michal Nowak
735857bb09 Merge branch 'mnowak/openbsd-6.9-v9_16' into 'v9_16'
[v9_16] Add OpenBSD 6.9

See merge request isc-projects/bind9!5064
2021-05-19 17:33:03 +00:00
Michal Nowak
fec3bc59f5 Add OpenBSD 6.9
(cherry picked from commit 315b8522ba)
2021-05-19 18:25:33 +02:00
Michal Nowak
78189e7d27 Merge branch '2694-drop-seq-command-from-views-tests-sh-v9_16' into 'v9_16'
[v9_16] Replace seq command with POSIX-compliant shell code

See merge request isc-projects/bind9!5062
2021-05-19 14:55:03 +00:00