Commit Graph

33285 Commits

Author SHA1 Message Date
Ondřej Surý
68cb38fc60 Cleanup the uv_import check
The uv_import() is not needed anymore, so we can remove the autoconf
check for it.

(cherry picked from commit 7b02848865)
2021-05-31 16:57:19 +02:00
Michał Kępień
2ed9e86580 Merge branch 'michal/regenerate-man-pages-with-docutils-0.16-v9_16' into 'v9_16'
[v9_16] Regenerate man pages with docutils 0.16

See merge request isc-projects/bind9!5120
2021-05-31 12:55:11 +00:00
Michał Kępień
1d239012a9 Regenerate man pages with docutils 0.16
Commit 070c5fff49 updated the man pages
to contents produced using:

  - Sphinx 4.0.2
  - sphinx-rtd-theme 0.5.2
  - docutils 0.17.1

However, sphinx-rtd-theme 0.5.2 is incompatible with versions 0.17+ of
the docutils package.  This problem was addressed in the Docker image
used for building man pages by downgrading the docutils package to
version 0.16.

Regenerate the man pages again, this time using:

  - Sphinx 4.0.2
  - sphinx-rtd-theme 0.5.2
  - docutils 0.16

This is necessary to prevent the "docs" GitLab CI job from failing.

(cherry picked from commit 6a2daddf5b)
2021-05-31 14:36:11 +02:00
Evan Hunt
4a93c54b56 Merge branch 'kchen-servestale-fix-v9_16' into 'v9_16'
Several serve-stale fixes

See merge request isc-projects/bind9!5118
2021-05-30 19:53:54 +00:00
Matthijs Mekking
89b0a0aa52 Reuse rdatset->ttl when dumping ancient RRsets
Rather than having an expensive 'expired' (fka 'stale_ttl') in the
rdataset structure, that is only used to be printed in a comment on
ancient RRsets, reuse the TTL field of the RRset.

(cherry picked from commit f7f543d99b)
2021-05-30 12:30:36 -07:00
Kevin Chen
3924f78748 Several serve-stale improvements
Commit a83c8cb0af updated masterdump so
that stale records in "rndc dumpdb" output no longer shows 0 TTLs.  In
this commit we change the name of the `rdataset->stale_ttl` field to
`rdataset->expired` to make its purpose clearer, and set it to zero in
cases where it's unused.

Add 'rbtdb->serve_stale_ttl' to various checks so that stale records
are not purged from the cache when they've been stale for RBTDB_VIRTUAL
(300) seconds.

Increment 'ns_statscounter_usedstale' when a stale answer is used.

Note: There was a question of whether 'overmem_purge' should be
purging ancient records, instead of stale ones.  It is left as purging
stale records, since stale records could take up the majority of the
cache.

This submission is copyrighted Akamai Technologies, Inc. and provided
under an MPL 2.0 license.

This commit was originally authored by Kevin Chen, and was updated by
Matthijs Mekking to match recent serve-stale developments.

(cherry picked from commit 0cdf85d204)
2021-05-30 12:30:36 -07:00
Evan Hunt
5daa9066d0 Merge branch '2733-serve-stale-prefetch-crash-v9_16' into 'v9_16'
Fix crash with serve-stale in combination with prefetch

See merge request isc-projects/bind9!5117
2021-05-30 07:57:27 +00:00
Matthijs Mekking
8433a39c54 Add CHANGES and notes for [#2733]
(cherry picked from commit 7ca253818e)
2021-05-30 00:33:42 -07:00
Evan Hunt
de480dcbb6 add a system test for the prefetch bug
Ensure that if prefetch is triggered as a result of a query
restart, it won't have the TRYSTALE_ONTIMEOUT flag set.

(cherry picked from commit 8c047feb3a)
2021-05-30 00:33:42 -07:00
Matthijs Mekking
a2ec3a1e4c Reset DNS_FETCHOPT_TRYSTALE_ONTIMEOUT on resume
Once we resume a query, we should clear DNS_FETCHOPT_TRYSTALE_ONTIMEOUT
from the options to prevent triggering the stale-answer-client-timeout
on subsequent fetches.

If we don't this may cause a crash when for example when prefetch is
triggered after a query restart.

(cherry picked from commit c0dc5937c7)
2021-05-30 00:33:42 -07:00
Michal Nowak
29421ba122 Merge branch 'mnowak/add-fedora-34-v9_16' into 'v9_16'
[v9_16] Add Fedora 34

See merge request isc-projects/bind9!5113
2021-05-28 11:35:38 +00:00
Michal Nowak
f19bdd7fd4 Add Fedora 34
(cherry picked from commit 5f27aaa0ff)
2021-05-28 12:59:02 +02:00
Evan Hunt
7b37091022 Merge branch '2731-servestale-dns64-v9_16' into 'v9_16'
fix a crash when using stale data with dns64

See merge request isc-projects/bind9!5112
2021-05-27 19:54:32 +00:00
Evan Hunt
534b4d8ed3 CHANGES, release note
(cherry picked from commit d8b793760c)
2021-05-27 12:09:43 -07:00
Matthijs Mekking
61214726da Test with stale timeout cache miss, then fetch completes
Add a test case where a client request is received and the stale
timeout occurs, but it is not served stale data because there is no entry
in the cache, then is served an authoritative answer once the background
fetch completes. This ensures that a stale timeout only affects a
subsequent response if the client was answered.

(cherry picked from commit c64589bf46)
2021-05-27 12:09:43 -07:00
Evan Hunt
85ca29e5e2 clean up query correctly if already answered by serve-stale
when a serve-stale answer has been sent, the client continues waiting
for a proper answer. if a final completion event for the client does
arrive, it can just be cleaned up without sending a response, similar
to a canceled fetch.

(cherry picked from commit 8bd8e995f1)
2021-05-27 12:09:43 -07:00
Evan Hunt
74766f68cc add a test of DNS64 processing with a stale negative response
- send a query for an AAAA which will be resolved as a mapped A
- disable authoritative responses
- wait for the negative AAAA response to become stale
- send another query, wait for the stale answer
- re-enable authorative responses so that a real answer arrives
- currently, this triggers an assertion in query.c

(cherry picked from commit 453e905d7e)
2021-05-27 12:09:43 -07:00
Ondřej Surý
c4afbb8148 Merge branch '2529-add-__attribute__-malloc-for-isc_mempool_get-v9_16' into 'v9_16'
Add malloc attribute to memory allocation functions

See merge request isc-projects/bind9!5001
2021-05-27 14:19:47 +00:00
Diego Fronza
4ed22937d8 Add malloc attribute to memory allocation functions
The malloc attribute allows compiler to do some optmizations on
functions that behave like malloc/calloc, like assuming that the
returned pointer do not alias other pointers.
2021-05-27 15:42:36 +02:00
Ondřej Surý
adbdde82d7 Merge branch '2536-inline-signing-documentation-doesn-t-match-reality-v9_16' into 'v9_16'
Resolve "inline-signing documentation doesn't match reality" (v9.16)

See merge request isc-projects/bind9!5110
2021-05-27 13:31:39 +00:00
Matthijs Mekking
8079b0ae8c checkconf tests for inline-signing at options/view
(cherry picked from commit a548a450b3)
2021-05-27 15:27:03 +02:00
Mark Andrews
2ef13c984f Add Release note for [GL #2536]
(cherry picked from commit 03978a7881)
2021-05-27 15:27:03 +02:00
Mark Andrews
9f6912e64b Add CHANGES note for [GL #2536]
(cherry picked from commit 475a553e37)
2021-05-27 15:27:03 +02:00
Mark Andrews
0b8cd8f19d inline-signing should have been in zone_only_clauses
(cherry picked from commit b3301da262)
2021-05-27 15:27:03 +02:00
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