Commit Graph

31799 Commits

Author SHA1 Message Date
Mark Andrews
f80cfadaba Merge branch '2013-unchecked-returns-of-inet_pton-in-geoip_test-c-v9_16' into 'v9_16'
check returns from inet_pton()

See merge request isc-projects/bind9!3837
2020-07-13 02:37:06 +00:00
Mark Andrews
12fac1ce70 check returns from inet_pton()
(cherry picked from commit 9499adeb5e)
2020-07-13 11:44:58 +10:00
Mark Andrews
fe9dc60ba4 Merge branch '2003-remove-redundant-listener-null-check-v9_16' into 'v9_16'
Remove redundant check for listener being non-NULL

See merge request isc-projects/bind9!3835
2020-07-13 01:11:26 +00:00
Mark Andrews
86464e6e4b Remove redundant check for listener being non-NULL
(cherry picked from commit c91dc92410)
2020-07-13 10:28:34 +10:00
Michał Kępień
4d38e0d448 Merge branch '1976-fix-locking-for-lmdb-0.9.26-v9_16' into 'v9_16'
[v9_16] Fix locking for LMDB 0.9.26

See merge request isc-projects/bind9!3831
2020-07-10 10:11:14 +00:00
Michał Kępień
a496b01487 Add CHANGES for GL #1976
(cherry picked from commit 7fffa5abba)
2020-07-10 11:30:46 +02:00
Michał Kępień
0bc4d6cc7a Fix locking for LMDB 0.9.26
When "rndc reconfig" is run, named first configures a fresh set of views
and then tears down the old views.  Consider what happens for a single
view with LMDB enabled; "envA" is the pointer to the LMDB environment
used by the original/old version of the view, "envB" is the pointer to
the same LMDB environment used by the new version of that view:

 1. mdb_env_open(envA) is called when the view is first created.
 2. "rndc reconfig" is called.
 3. mdb_env_open(envB) is called for the new instance of the view.
 4. mdb_env_close(envA) is called for the old instance of the view.

This seems to have worked so far.  However, an upstream change [1] in
LMDB which will be part of its 0.9.26 release prevents the above
sequence of calls from working as intended because the locktable mutexes
will now get destroyed by the mdb_env_close() call in step 4 above,
causing any subsequent mdb_txn_begin() calls to fail (because all of the
above steps are happening within a single named process).

Preventing the above scenario from happening would require either
redesigning the way we use LMDB in BIND, which is not something we can
easily backport, or redesigning the way BIND carries out its
reconfiguration process, which would be an even more severe change.

To work around the problem, set MDB_NOLOCK when calling mdb_env_open()
to stop LMDB from controlling concurrent access to the database and do
the necessary locking in named instead.  Reuse the view->new_zone_lock
mutex for this purpose to prevent the need for modifying struct dns_view
(which would necessitate library API version bumps).  Drop use of
MDB_NOTLS as it is made redundant by MDB_NOLOCK: MDB_NOTLS only affects
where LMDB reader locktable slots are stored while MDB_NOLOCK prevents
the reader locktable from being used altogether.

[1] 2fd44e3251

(cherry picked from commit 53120279b5)
2020-07-10 11:30:31 +02:00
Mark Andrews
6ddf0667aa Merge branch '2011-off-by-one-error-in-dns_rdatatype_attributes-v9_16' into 'v9_16'
Adjust range limit of unknown meta types

See merge request isc-projects/bind9!3825
2020-07-08 04:42:06 +00:00
Mark Andrews
86681ca6f1 Adjust range limit of unknown meta types
(cherry picked from commit 092a159dcd)
2020-07-08 13:44:47 +10:00
Mark Andrews
8a36946413 Merge branch '2009-update-isc-logo-in-documentation-v9_16' into 'v9_16'
Update ISC logo

See merge request isc-projects/bind9!3822
2020-07-08 03:40:09 +00:00
Mark Andrews
714424e0eb Update ISC logo
(cherry picked from commit 875a637eeb)
2020-07-08 03:25:57 +00:00
Mark Andrews
acb018599e Merge branch '1475-convert-header-attributes-to-atomic-v9_16' into 'v9_16'
Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1545 in mark_header_stale and check_stale_header"

See merge request isc-projects/bind9!3821
2020-07-08 02:56:29 +00:00
Mark Andrews
032133d8ce Add CHANGES note for [GL #1475]
(cherry picked from commit adf7cb4ba7)
2020-07-08 12:02:25 +10:00
Ondřej Surý
0279cc76a7 Update STALE and ANCIENT header attributes atomically
The ThreadSanitizer found a data race when updating the stale header.
Instead of trying to acquire the write lock and failing occasionally
which would skew the statistics, the dns_rdatasetheader_t.attributes
field has been promoted to use stdatomics.  Updating the attributes in
the mark_header_ancient() and mark_header_stale() now uses the cmpxchg
to update the attributes forfeiting the need to hold the write lock on
the tree.  Please note that mark_header_ancient() still needs to hold
the lock because .dirty is being updated in the same go.

(cherry picked from commit 81d4230e60)
2020-07-08 12:01:46 +10:00
Mark Andrews
48939d5c59 Merge branch 'ondrej/add-16-bit-stdatomic-shims-v9_16' into 'v9_16'
Make the stdatomic shim and mutexatomic type complete

See merge request isc-projects/bind9!3819
2020-07-08 01:19:16 +00:00
Mark Andrews
dd32fb9284 Make the stdatomic shim and mutexatomic type complete
The stdatomic shims for non-C11 compilers (Windows, old gcc, ...) and
mutexatomic implemented only and minimal subset of the atomic types.
This commit adds 16-bit operations for Windows and all atomic types as
defined in standard.

(cherry picked from commit bccea5862d)
2020-07-08 10:29:59 +10:00
Mark Andrews
b10416d87e Merge branch '1991-cleanup-redundant-non-null-check-v9_16' into 'v9_16'
remove redundant rctx != NULL check

See merge request isc-projects/bind9!3805
2020-07-06 01:22:01 +00:00
Mark Andrews
244ebdfb8c remove redundant rctx != NULL check
(cherry picked from commit 2fa2dbd5fb)
2020-07-06 10:30:25 +10:00
Matthijs Mekking
4c5ce87043 Merge branch '1988-windows-rndc-dnssec-status-bad-output-v9_16' into 'v9_16'
Increase "rndc dnssec -status" output size

See merge request isc-projects/bind9!3804
2020-07-04 16:31:11 +00:00
Matthijs Mekking
293d52341d Increase "rndc dnssec -status" output size
BUFSIZ (512 bytes on Windows) may not be enough to fit the status of a
DNSSEC policy and three DNSSEC keys.

Set the size of the relevant buffer to a hardcoded value of 4096 bytes,
which should be enough for most scenarios.

(cherry picked from commit 9347e7db7e)
2020-07-03 15:13:50 +02:00
Ondřej Surý
448a2e7314 Merge branch 'ondrej/dont-fail-system-test-on-missing-pytest-v9_16' into 'v9_16'
Add prereq.sh script to the shutdown system test

See merge request isc-projects/bind9!3796
2020-07-03 07:22:00 +00:00
Ondřej Surý
b9b1366bf0 Add prereq.sh script to the shutdown system test
The shutdown test requires python, pytest and dnspython.
2020-07-03 08:54:01 +02:00
Michał Kępień
38ca3fbcdc Merge branch '1627-add-changes-entry-v9_16' into 'v9_16'
[v9_16] Add CHANGES entry for #1627

See merge request isc-projects/bind9!3797
2020-07-02 09:23:05 +00:00
Michał Kępień
c84cea3f9b Add CHANGES entry for #1627
(cherry picked from commit dee2b3c7c8)
2020-07-02 11:21:20 +02:00
Ondřej Surý
fb713451ab Merge branch '1951-add-bind-version-number-to-introduction-rst-file-v9_16' into 'v9_16'
Add release statement to introduction.rst

See merge request isc-projects/bind9!3792
2020-07-02 08:06:25 +00:00
Suzanne Goldlust
c25c0a1ef3 Add release statement to introduction.rst
(and remove duplicate copyright statement)

(cherry picked from commit a4549f89bf)
2020-07-02 10:05:45 +02:00
Mark Andrews
006b1f0378 Merge branch '1939-rumoured-kasp-intermittent-failures-v9_16' into 'v9_16'
Resolve "kasp system test intermittent test failures for "rumoured.kasp" zone"

See merge request isc-projects/bind9!3786
2020-07-02 05:30:34 +00:00
Matthijs Mekking
de02eb55b5 Fix kasp test set_keytime
While the creation and publication times of the various keys
in this policy are nearly at the same time there is a chance that
one key is created a second later than the other.

The `set_keytimes_algorithm_policy` mistakenly set the keytimes
for KEY3 based of the "published" time from KEY2.

(cherry picked from commit 24e07ae98e)
2020-07-02 04:56:20 +00:00
Ondřej Surý
a10f754c60 Merge branch '1987-fix-formatting-error-in-man-pages-section-of-bind-arm-v9_16' into 'v9_16'
Fix formatting of See Also section header

See merge request isc-projects/bind9!3787
2020-07-01 21:47:15 +00:00
Suzanne Goldlust
4112b96d52 Fix formatting of See Also section header
(cherry picked from commit e3e787bc14)
2020-07-01 23:46:39 +02:00
Michał Kępień
63548a4f2c Merge branch '1946-man-page-installation-fixes' into 'v9_16'
Man page installation fixes

See merge request isc-projects/bind9!3772
2020-07-01 20:08:39 +00:00
Michał Kępień
8c9cacb7e8 Restore man pages for symlinked BIND tools
Commit b580eb2fb3 inadvertently caused the
man pages for symlinked BIND tools (named-compilezone, tsig-keygen) to
no longer be installed by "make install".  Fix by restoring the commands
which ensure that.
2020-07-01 22:06:25 +02:00
Michał Kępień
58c07cc153 Install NZD-related man pages conditionally
Commit b580eb2fb3 inadvertently caused
NZD-related man pages to be installed unconditionally.  Ensure they are
only installed for LMDB-enabled builds.
2020-07-01 22:06:25 +02:00
Michał Kępień
75e322ec08 Install dnstap-related man pages conditionally
Commit b580eb2fb3 inadvertently caused
dnstap-related man pages to be installed unconditionally.  Ensure they
are only installed for dnstap-enabled builds.
2020-07-01 22:06:25 +02:00
Ondřej Surý
be5aa87d58 Merge branch '1968-cleanup-dead-nodes-fix-v9_16' into 'v9_16'
Resolve "Again: BIND | rbtdb.c:2162: INSIST with bind with 9.11.20  (see #1718)"

See merge request isc-projects/bind9!3782
2020-07-01 14:07:36 +00:00
Ondřej Surý
3733bd33e9 Add CHANGES and release note for #1968
(cherry picked from commit 4c12709da4)
2020-07-01 15:35:21 +02:00
Witold Kręcicki
000c7d1340 rbtdb: cleanup_dead_nodes should ignore alive nodes on the deadlist
(cherry picked from commit c8f2d55acf)
2020-07-01 15:35:21 +02:00
Ondřej Surý
d5a0bd2cf2 Merge branch '1862-insist-in-query-c-v9_16' into 'v9_16'
Fix assertion failure when server is under load and root zone is not yet loaded. (v9.16)

See merge request isc-projects/bind9!3774
2020-07-01 13:04:08 +00:00
Ondřej Surý
935123ff99 Add release notes for #1862 2020-07-01 12:55:49 +02:00
Witold Kręcicki
85a786abd2 Add CHANGES note for #1862 2020-07-01 12:55:29 +02:00
Witold Kręcicki
03e583ffa8 Fix assertion failure during startup when the server is under load.
When we're coming back from recursion fetch_callback does not accept
DNS_R_NXDOMAIN as an rcode - query_gotanswer calls query_nxdomain in
which an assertion fails on qctx->is_zone. Yet, under some
circumstances, qname minimization will return an DNS_R_NXDOMAIN - when
root zone mirror is not yet loaded. The fix changes the DNS_R_NXDOMAIN
answer to DNS_R_SERVFAIL.
2020-07-01 12:55:12 +02:00
Ondřej Surý
0bffc160ec Merge branch '1747-fix-race-in-rndc-when-shutting-down-v9_16' into 'v9_16'
Resolve "BIND 9.16.1 does core dump when stopped"

See merge request isc-projects/bind9!3778
2020-07-01 10:53:42 +00:00
Ondřej Surý
401fd09e4d Add CHANGES and release not for #1747
(cherry picked from commit 605209402f)
2020-07-01 12:52:51 +02:00
Diego Fronza
004849fd36 Added test for the fix
This test ensures that named will correctly shutdown
when receiving multiple control connections after processing
of either "rncd stop" or "kill -SIGTERM" commands.

Before the fix, named was crashing due to a race condition happening
between two threads, one running shutdown logic in named/server.c
and other handling control logic in controlconf.c.

This test tries to reproduce the above scenario by issuing multiple
queries to a target named instance, issuing either rndc stop or kill
-SIGTERM command to the same named instance, then starting multiple rndc
status connections to ensure it is not crashing anymore.

(cherry picked from commit 042e509753)
2020-07-01 12:52:51 +02:00
Ondřej Surý
7c0fb5e492 Don't continue opening a new rndc connection if we are shutting down
Due to lack of synchronization, whenever named was being requested to
stop using rndc, controlconf.c module could be trying to access an already
released pointer through named_g_server->interfacemgr in a separate
thread.

The race could only be triggered if named was being shutdown and more
rndc connections were ocurring at the same time.

This fix correctly checks if the server is shutting down before opening
a new rndc connection.

(cherry picked from commit be6cc53ec2)
2020-07-01 12:52:51 +02:00
Ondřej Surý
1e4ac3a94c Merge branch 'ondrej/update-rndc.conf-manpage-v9_16' into 'v9_16'
Commit the regenerated rndc.conf.5in manual page

See merge request isc-projects/bind9!3779
2020-07-01 10:21:34 +00:00
Ondřej Surý
4d65685cc3 Commit the regenerated rndc.conf.5in manual page
(cherry picked from commit c5b63e14bc)
2020-07-01 12:21:16 +02:00
Matthijs Mekking
99b9c82cec Merge branch '1612-rndc-dnssec-status-v9_16' into 'v9_16'
Resolve "Get current state of DNSSEC keys (kasp) via rndc"

See merge request isc-projects/bind9!3771
2020-07-01 10:14:53 +00:00
Matthijs Mekking
9f5a43808f Fix linking problem for #1612
When a library is examined, an object file within it can be left out
of the link if it does not provide symbols that the symbol table
needs.  Introducing `isc_stdtime_tostring` caused a build failure for
`update_test` because it now requires `libisc.a(stdtime.o)` and that
also exports the `isc_stdtime_get` symbol, meaning we have a
multiple definition error.

Add a local version of `isc_stdtime_tostring`, so that the linker
will not search for it in available object files.
2020-07-01 10:55:30 +02:00
Matthijs Mekking
2d9b282d77 Update notes, changes for #1612
(cherry picked from commit e273b95a8b)
2020-07-01 09:58:25 +02:00