2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00
Commit Graph

32182 Commits

Author SHA1 Message Date
Evan Hunt
e43b3c1fa1 further tidying of primary/secondary terminology in system tests
this changes most visble uses of master/slave terminology in tests.sh
and most uses of 'type master' or 'type slave' in named.conf files.
files in the checkconf test were not updated in order to confirm that
the old syntax still works. rpzrecurse was also left mostly unchanged
to avoid interference with DNSRPS.
2020-07-01 11:12:12 -07:00
Evan Hunt
68c384e118 use primary/secondary terminology in 'rndc zonestatus' 2020-07-01 11:11:34 -07:00
Evan Hunt
f619708bbf prevent "primaries" lists from having duplicate names
it is now an error to have two primaries lists with the same
name. this is true regardless of whether the "primaries" or
"masters" keywords were used to define them.
2020-07-01 11:11:34 -07:00
Evan Hunt
424a3cf3cc add "primary-only" as a synonym for "master-only"
update the "notify" option to use RFC 8499 terminology as well.
2020-07-01 11:11:34 -07:00
Evan Hunt
16e14353b1 add "primaries" as a synonym for "masters" in named.conf
as "type primary" is preferred over "type master" now, it makes
sense to make "primaries" available as a synonym too.

added a correctness check to ensure "primaries" and "masters"
cannot both be used in the same zone.
2020-07-01 11:11:34 -07:00
Evan Hunt
4ea6bb7257 Merge branch 'each-rndc-netmgr-pt1.5' into 'main'
Fix socket closing races.

Closes #1660

See merge request isc-projects/bind9!3781
2020-07-01 17:04:51 +00:00
Evan Hunt
233f134a4f Don't destroy a non-closed socket, wait for all the callbacks.
We erroneously tried to destroy a socket after issuing
isc__nm_tcp{,dns}_close. Under some (race) circumstances we could get
nm_socket_cleanup to be called twice for the same socket, causing an
access to a dead memory.
2020-07-01 17:35:10 +02:00
Witold Kręcicki
896db0f419 Fix possible race in isc__nm_tcpconnect.
There's a possibility of race in isc__nm_tcpconnect if the asynchronous
connect operation finishes with all the callbacks before we exit the
isc__nm_tcpconnect itself we might access an already freed memory.
Fix it by creating an additional reference to the socket freed at the
end of isc__nm_tcpconnect.
2020-07-01 13:52:12 +00:00
Witold Kręcicki
25f84ffc68 Add missing libisc.def definitions, netmgr version of isc_sockettype_t. 2020-07-01 13:52:12 +00:00
Ondřej Surý
7500fb9319 Merge branch '1968-cleanup-dead-nodes-fix' into 'main'
rbtdb: cleanup_dead_nodes should ignore alive nodes on the deadlist

Closes #1968

See merge request isc-projects/bind9!3773
2020-07-01 13:34:54 +00:00
Ondřej Surý
4c12709da4 Add CHANGES and release note for #1968 2020-07-01 15:11:44 +02:00
Witold Kręcicki
c8f2d55acf rbtdb: cleanup_dead_nodes should ignore alive nodes on the deadlist 2020-07-01 15:11:07 +02:00
Ondřej Surý
dbd03ce112 Merge branch '1862-insist-in-query-c' into 'main'
Fix assertion failure when server is under load and root zone is not yet loaded.

Closes #1862

See merge request isc-projects/bind9!3572
2020-07-01 10:56:38 +00:00
Ondřej Surý
ee43457811 Add release notes for #1862 2020-07-01 12:26:17 +02:00
Witold Kręcicki
4897c87716 Add CHANGES note for #1862 2020-07-01 12:25:51 +02:00
Witold Kręcicki
b4f3fafcff 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:25:36 +02:00
Ondřej Surý
ee7bc2163f Merge branch 'ondrej/update-rndc.conf-manpage' into 'main'
Commit the regenerated rndc.conf.5in manual page

See merge request isc-projects/bind9!3777
2020-07-01 10:18:55 +00:00
Ondřej Surý
c5b63e14bc Commit the regenerated rndc.conf.5in manual page 2020-07-01 12:14:29 +02:00
Ondřej Surý
6b8a548732 Merge branch '1747-fix-race-in-rndc-when-shutting-down' into 'main'
Resolve "BIND 9.16.1 does core dump when stopped"

Closes #1747

See merge request isc-projects/bind9!3740
2020-07-01 10:14:05 +00:00
Ondřej Surý
605209402f Add CHANGES and release not for #1747 2020-07-01 11:59:01 +02:00
Diego Fronza
042e509753 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.
2020-07-01 11:59:01 +02:00
Ondřej Surý
be6cc53ec2 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.
2020-07-01 08:44:56 +02:00
Evan Hunt
402e16546d Merge branch '1936-blackhole-fix' into 'main'
Resolve "blackhole ACL broken"

Closes #1936

See merge request isc-projects/bind9!3751
2020-07-01 02:41:02 +00:00
Evan Hunt
08401e38c1 CHANGES, release note 2020-06-30 17:31:29 -07:00
Evan Hunt
23c7373d68 restore "blackhole" functionality
the blackhole ACL was accidentally disabled with respect to client
queries during the netmgr conversion.

in order to make this work for TCP, it was necessary to add a return
code to the accept callback functions passed to isc_nm_listentcp() and
isc_nm_listentcpdns().
2020-06-30 17:29:09 -07:00
Evan Hunt
e3ee138098 update the acl system test to include a blackhole test case
this ACL was previously untested, which allowed a regression to
go undetected.
2020-06-30 17:29:09 -07:00
Matthijs Mekking
3970e6e832 Merge branch '1612-rndc-dnssec-status' into 'main'
Resolve "Get current state of DNSSEC keys (kasp) via rndc"

Closes #1612

See merge request isc-projects/bind9!3717
2020-06-30 09:12:48 +00:00
Matthijs Mekking
e273b95a8b Update notes, changes for #1612 2020-06-30 09:51:22 +02:00
Matthijs Mekking
19ce9ec1d4 Output rndc dnssec -status
Implement the 'rndc dnssec -status' command that will output
some information about the key states, such as which policy is
used for the zone, what keys are in use, and when rollover is
scheduled.

Add loose testing in the kasp system test, the actual times are
already tested via key file inspection.
2020-06-30 09:51:04 +02:00
Matthijs Mekking
e1ba1bea7c Implement dummy 'rndc dnssec -status' command
Add the code and documentation required to provide DNSSEC signing
status through rndc.  This does not yet show any useful information,
just provide the command that will output some dummy string.
2020-06-30 09:51:04 +02:00
Matthijs Mekking
9e03f8e8fe Move dst key printtime in separate function
I'd like to use the same functionality (pretty print the datetime
of keytime metadata) in the 'rndc dnssec -status' command.  So it is
better that this logic is done in a separate function.

Since the stdtime.c code have differernt files for unix and win32,
I think the "#ifdef WIN32" define can be dropped.
2020-06-30 09:51:04 +02:00
Matthijs Mekking
9724b6f68d Merge branch 'matthijs-one-more-rfc4592-test' into 'main'
Add one more RFC 4592 test

See merge request isc-projects/bind9!3764
2020-06-30 07:01:47 +00:00
Matthijs Mekking
f0b5eb03bb Add one more RFC 4592 test
This deals with the SRV example.
2020-06-30 05:22:24 +00:00
Mark Andrews
37213cb994 Merge branch 'marka-fixup-dnstap-test' into 'main'
Fix the dnstap roll test

See merge request isc-projects/bind9!3756
2020-06-29 22:28:46 +00:00
Mark Andrews
b3215125ea Fix the dnstap roll test by:
* fixing the find call.
* checking that we rolled a file.
2020-06-30 08:27:58 +10:00
Evan Hunt
01176a8e7a Merge branch 'placeholder' into 'main'
placeholder

See merge request isc-projects/bind9!3767
2020-06-29 20:23:30 +00:00
Evan Hunt
add6d07921 placeholder 2020-06-29 13:22:42 -07:00
Ondřej Surý
dfe4cbbcca Merge branch 'ondrej/fix-manpages-in-rtd' into 'main'
Fix the manpages TOC in the BIND 9 ARM

See merge request isc-projects/bind9!3765
2020-06-29 17:40:37 +00:00
Ondřej Surý
b51d10608e Fix miscellaneous little bugs in RST formatting 2020-06-29 19:39:03 +02:00
Ondřej Surý
5c56a0ddbc Add missing rndc.conf header that was breaking manpages section
The rndc.conf main header was missing the header markup and that was
breaking the TOC for all manpages in the ARM because sphinx-build
incorrectly remembered the markup for subheader to be ~~~~ instead of
----.
2020-06-29 19:37:18 +02:00
Michał Kępień
ac9de68750 Merge branch 'mnowak/add-new-releases' into 'main'
Add Ubuntu 20.04, Fedora 32, Alpine 3.12, OpenBSD 6.7, and FreeBSD 11.4

See merge request isc-projects/bind9!3503
2020-06-29 10:42:22 +00:00
Michał Kępień
1be15f5900 Fix build-time GSSAPI detection on Tumbleweed
The "krb5-devel" package on openSUSE Tumbleweed installs the
"krb5-config" binary into a custom prefix, which prevents BIND's
"configure" script from autodetecting it.  Fix by specifying the path to
the "krb5-config" binary using --with-gssapi.
2020-06-29 12:08:19 +02:00
Michal Nowak
18f97b9af2 Update FreeBSD 11 to 11.4 2020-06-29 12:08:19 +02:00
Michal Nowak
eff79ab20c Update to Alpine Linux 3.12 2020-06-29 12:08:19 +02:00
Michal Nowak
374660fd37 Update to OpenBSD 6.7 2020-06-29 12:08:19 +02:00
Michal Nowak
27c8bc1750 Drop Bionic 2020-06-29 12:08:19 +02:00
Michal Nowak
c3e259a8c9 Add Ubuntu 20.04 Focal Fossa, update Fedora to 32 2020-06-29 12:08:19 +02:00
Michał Kępień
58f89dfff8 Merge branch 'michal/fix-libdns-cflags' into 'main'
Fix libdns CFLAGS

See merge request isc-projects/bind9!3759
2020-06-29 08:29:19 +00:00
Michał Kępień
0975eeedd7 Fix libdns CFLAGS
Since lib/dns/include/dns/view.h unconditionally defines dnstap-related
fields in struct dns_view (and includes <dns/dnstap.h>), care must be
taken to ensure that any source file which includes <dns/view.h> gets
built with a set of CFLAGS which allows <dns/dnstap.h> to be properly
processed (particularly its <fstrm.h> and <protobuf-c/protobuf-c.h>
conditional dependencies which are only included for dnstap-enabled
builds).  Ensure that by making LIBDNS_CFLAGS include DNSTAP_CFLAGS when
building with dnstap support.

The same reasoning applies for LMDB_CFLAGS.
2020-06-29 10:23:23 +02:00
Michał Kępień
bf0229caad Fix restoring CFLAGS and LIBS in AX_LIB_LMDB()
The AX_LIB_LMDB() macro attempts to test the potential LMDB installation
path provided to it by temporarily updating CFLAGS and LIBS, calling
AC_SEARCH_LIBS(), and then restoring CFLAGS and LIBS to their original
values.  However, including certain statements (e.g. "break") in the
arguments provided to the AX_LIB_LMDB() macro may cause an early exit
from it, in which case CFLAGS and LIBS will be left polluted.  Fix by
resetting CFLAGS and LIBS to their original values before executing the
commands provided as AX_LIB_LMDB() arguments.
2020-06-29 10:23:23 +02:00