Commit Graph
33033 Commits
Author SHA1 Message Date
Matthijs Mekking 18d7e982fb ECDSA code should not use RSA label
The 'opensslecdsa_tofile()' function tags the label as an RSA label,
that is a copy paste error and should be of course an ECDSA label.
2020-12-15 14:33:45 +01:00
Matthijs Mekking 85acaeec41 Correctly update pointers to pubkey and privkey
The functions 'load_pubkey_from_engine()' and
'load_privkey_from_engine()' did not correctly store the pointers.

Update both functions to add 'EC_KEY_set_public_key()' and
'EC_KEY_set_private_key()' respectively, so that the pointers to
the public and private keys survive the "load from engine" functions.
2020-12-15 14:31:05 +01:00
Matthijs Mekking c40c5d3dd9 load_pubkey_from_engine() should load public key
The 'function load_pubkey_from_engine()' made a call to the libssl
function 'ENGINE_load_private_key'.  This is a copy paste error and
should be 'ENGINE_load_public_key'.
2020-12-15 14:28:51 +01:00
Michal Nowak c99fe579b9 Merge branch 'mnowak/fix-rndc-8-reference-in-named-8-man-page' into 'main'
Fix a reference to rndc(8) in named(8) manual page

See merge request isc-projects/bind9!4478
2020-12-14 12:12:54 +00:00
Michal Nowak befcbcac28 Fix a reference to rndc(8) in named(8) manual page 2020-12-14 13:10:10 +01:00
Ondřej Surý 27f0988b52 Merge branch '2058-print-warning-when-fallback-to-soaserial-increment' into 'main'
Resolve "`dnssec-signzone -N unixtime` behaves like `increment`"

Closes #2058

See merge request isc-projects/bind9!4487
2020-12-12 06:52:50 +00:00
Ondřej SurýandOndřej Surý ba887a688c Add CHANGES and release notes for GL #2058 2020-12-12 07:15:45 +01:00
Mark AndrewsandOndřej Surý eb1b29b19e Update dnssec-signzone -N soa-serial-format description
document the autoincrement when the serial would go backwards.
2020-12-11 10:48:28 +01:00
Ondřej SurýandOndřej Surý ef685bab5c Print warning when falling back to increment soa serial method
When using the `unixtime` or `date` method to update the SOA serial,
`named` and `dnssec-signzone` would silently fallback to `increment`
method to prevent the new serial number to be smaller than the old
serial number (using the serial number arithmetics).  Add a warning
message when such fallback happens.
2020-12-11 10:48:28 +01:00
Mark Andrews 3e4f5319ef Merge branch '385-add-a-built-in-ipv4only-arpa-default-zone' into 'main'
Resolve "Add a built-in ipv4only.arpa default zone."

Closes #385

See merge request isc-projects/bind9!479
2020-12-11 06:04:47 +00:00
Mark Andrews ea0dbb5338 Add CHANGES note 2020-12-11 14:21:54 +11:00
Mark Andrews 88943974de Add release note entry 2020-12-11 14:17:52 +11:00
Mark Andrews 6d10a57397 Add RFC 7050 and RFC 8880 to rfc-compliance 2020-12-11 14:17:52 +11:00
Mark Andrews 64c45abab2 Document ipv4only-enable, ipv4only-contact and ipv4only-server. 2020-12-11 14:17:52 +11:00
Mark Andrews 5684c21bcf Generate PTR records for DNS64 mapped ipv4only.arpa reverses.
Rather than generating CNAMES records pointing into IN-ADDR.ARPA,
generate PTR records directly as the names are known as per RFC 8880.
2020-12-11 14:17:52 +11:00
Mark Andrews cdfe660326 Checking synthesis of AAAA of builtin ipv4only.arpa 2020-12-11 14:17:47 +11:00
Mark Andrews c51ef23c22 Implement ipv4only.arpa forward and reverse zones as per RFC 8880. 2020-12-11 14:16:40 +11:00
Mark Andrews e4557f4203 Merge branch 'marka-placeholder' into 'main'
Add placeholders for [GL !4454] and [GL #2324]

See merge request isc-projects/bind9!4485
2020-12-10 02:43:41 +00:00
Mark Andrews 4257415cfb Add placeholders for [GL !4454] and [GL #2324] 2020-12-10 13:40:56 +11:00
Ondřej Surý 8129fce759 Merge branch 'ondrej/release-notes-doesnt-need-copyright' into 'main'
Remove the requirement for the release notes to have copyright

See merge request isc-projects/bind9!4483
2020-12-09 09:48:53 +00:00
Ondřej Surý cb30d9892d Remove the requirement for the release notes to have copyright
The release notes doesn't have to have copyright header, it doesn't add
any value there as the release notes are useless outside the project.
2020-12-09 10:38:05 +01:00
Ondřej Surý afcfb22fc3 Merge branch 'ondrej/clang-format-11' into 'main'
Update the clang version to new stable llvm/clang 11

See merge request isc-projects/bind9!4003
2020-12-08 18:35:25 +00:00
Ondřej Surý c1eb385fdf Bump the clang version to 11 (stable) 2020-12-08 18:36:23 +01:00
Ondřej Surý 7ba18870dc Reformat sources using clang-format-11 2020-12-08 18:36:23 +01:00
Ondřej SurýandOndřej Surý 6c28834354 Explicitly configure new clang-format-11 options 2020-12-08 18:40:43 +01:00
Evan Hunt ff315d328f Merge branch 'placeholder' into 'main'
placeholder for change 5546

See merge request isc-projects/bind9!4473
2020-12-04 19:40:42 +00:00
Evan Hunt 5af9b85eda placeholder for change 5546 2020-12-04 11:37:58 -08:00
Ondřej Surý c64dfadf32 Merge branch 'ondrej/fix-using-the-load-balanced-sockets' into 'main'
Fix s/HAVE_REUSEPORT_LB/HAVE_SO_REUSEPORT_LB/ typo in #define

See merge request isc-projects/bind9!4472
2020-12-04 13:55:56 +00:00
Ondřej Surý 5caf33feda Fix HAVE_SO_REUSEPORT_LB macro name definition
A typo in macro definition caused the load-balanced sockets to be
disabled even on platforms with existing support for load-balanced
sockets.
2020-12-04 14:45:22 +01:00
Ondřej Surý 7176530ecd Merge branch 'ondrej/fix-the-windows-nchildren-problem' into 'main'
Use sock->nchildren instead of mgr->nworkers when initializing NM

See merge request isc-projects/bind9!4469
2020-12-03 17:42:53 +00:00
Ondřej SurýandOndřej Surý 87c5867202 Use sock->nchildren instead of mgr->nworkers when initializing NM
On Windows, we were limiting the number of listening children to just 1,
but we were then iterating on mgr->nworkers.  That lead to scheduling
more async_*listen() than actually allocated and out-of-bound read-write
operation on the heap.
2020-12-03 18:03:25 +01:00
Ondřej Surý ae35829faf Merge branch '2314-fix-datarace-in-nm-connect-functions' into 'main'
Fix datarace when UDP/TCP connect fails and we are in nmthread

Closes #2332 and #2314

See merge request isc-projects/bind9!4468
2020-12-03 14:41:57 +00:00
Ondřej Surý 8e1a05c86b Merge branch 'ondrej/set-openbsd-system-connection-timeout' into 'main'
Configure the system-wide TCP connection timeout on OpenBSD

See merge request isc-projects/bind9!4466
2020-12-03 13:02:57 +00:00
Ondřej SurýandOndřej Surý 8ff15fc028 Configure the system-wide TCP connection timeout on OpenBSD
As there's no TCP connection timeout socket option that we can use, we
need to configure the TCP connection timeout system-wide in the CI, so
the netmgr unit tests doesn't cause assertion failure when there stuck
outgoing TCP connection waiting for 150 second timeout.
2020-12-03 13:02:36 +00:00
Ondřej Surý 151852f428 Fix datarace when UDP/TCP connect fails and we are in nmthread
When we were in nmthread, the isc__nm_async_<proto>connect() function
executes in the same thread as the isc__nm_<proto>connect() and on a
failure, it would block indefinitely because the failure branch was
setting sock->active to false before the condition around the wait had a
chance to skip the WAIT().

This also fixes the zero system test being stuck on FreeBSD 11, so we
re-enable the test in the commit.
2020-12-03 13:56:34 +01:00
Michał Kępień bd59843a4b Merge branch '2333-temporarily-disable-the-legacy-test-on-windows' into 'main'
Temporarily disable the "legacy" test on Windows

See merge request isc-projects/bind9!4462
2020-12-03 11:49:43 +00:00
Michał Kępień 6697f6f066 Temporarily disable the "legacy" test on Windows
The current issues with the way dig handles TCP "connection refused"
errors cause the "legacy" system test to consistently fail on Windows
due to the expected strings not being present in dig output.
Temporarily disable the "legacy" system test on Windows by moving it
from the PARALLEL_COMMON list to the PARALLEL_UNIX list until the
situation is rectified.
2020-12-03 12:48:43 +01:00
Ondřej Surý 48a52234ee Merge branch '2137-so_reuseport-doesn-t-distribute-udp-queries-to-multiple-netmgr-workers-on-macos' into 'main'
Distribute queries among threads even on platforms without SO_REUSEPORT_LB

Closes #2137

See merge request isc-projects/bind9!4459
2020-12-03 09:58:02 +00:00
Ondřej Surý 5e1a23a1b6 Add CHANGES and release note for GL #2137 2020-12-03 09:23:24 +01:00
Ondřej Surý 4adeaab73d Add FreeBSD connection timeout socket option
On FreeBSD, the option to configure connection timeout is called
TCP_KEEPINIT, use it to configure the connection timeout there.

This also fixes the dangling socket problems in the unit test, so
re-enable them.
2020-12-03 09:23:24 +01:00
Ondřej Surý d0f5407825 Merge branch '2332-fix-use-after-free-in-tcpdns_send_direct' into 'main'
Don't use stack allocated buffer for uv_write()

Closes #2332

See merge request isc-projects/bind9!4465
2020-12-03 08:21:10 +00:00
Ondřej Surý 1d066e4bc5 Distribute queries among threads even on platforms without lb sockets
On platforms without load-balancing socket all the queries would be
handle by a single thread.  Currently, the support for load-balanced
sockets is present in Linux with SO_REUSEPORT and FreeBSD 12 with
SO_REUSEPORT_LB.

This commit adds workaround for such platforms that:

1. setups single shared listening socket for all listening nmthreads for
   UDP, TCP and TCPDNS netmgr transports

2. Calls uv_udp_bind/uv_tcp_bind on the underlying socket just once and
   for rest of the nmthreads only copy the internal libuv flags (should
   be just UV_HANDLE_BOUND and optionally UV_HANDLE_IPV6).

3. start reading on UDP socket or listening on TCP socket

The load distribution among the nmthreads is uneven, but it's still
better than utilizing just one thread for processing all the incoming
queries
2020-12-03 09:20:33 +01:00
Ondřej SurýandOndřej Surý 94afea9325 Don't use stack allocated buffer for uv_write()
On FreeBSD, the stack is destroyed more aggressively than on Linux and
that revealed a bug where we were allocating the 16-bit len for the
TCPDNS message on the stack and the buffer got garbled before the
uv_write() sendback was executed.  Now, the len is part of the uvreq, so
we can safely pass it to the uv_write() as the req gets destroyed after
the sendcb is executed.
2020-12-03 08:58:16 +01:00
Artem Boldariev aefe2b9958 Merge branch 'artem/random-additions-to-the-gitignore' into 'main'
Some small, random additions to the .gitignore.

See merge request isc-projects/bind9!4463
2020-12-02 22:25:55 +00:00
Artem Boldariev e6ac4480a4 Some small, random additions to the .gitignore.
Ignores some auxiliary files generated/used by the following tools: -

- clangd
- GNU Global
- Emacs
2020-12-03 00:21:23 +02:00
Michał Kępień 81c080e429 Merge branch '2328-make-netmgr-initialize-and-cleanup-winsock-itself' into 'main'
Make netmgr initialize and cleanup Winsock itself

Closes #2328

See merge request isc-projects/bind9!4458
2020-12-02 21:39:14 +00:00
Michał Kępień 88f96faba8 Make netmgr initialize and cleanup Winsock itself
On Windows, WSAStartup() needs to be called to initialize Winsock before
any sockets are created or else socket() calls will return error code
10093 (WSANOTINITIALISED).  Since BIND's Network Manager is intended to
work as a reusable networking library, it should take care of calling
WSAStartup() - and its cleanup counterpart, WSACleanup() - itself rather
than relying on external code to do it.  Add the necessary WSAStartup()
and WSACleanup() calls to isc_nm_start() and isc_nm_destroy(),
respectively.
2020-12-02 22:36:23 +01:00
Michał Kępień dc2e1dea86 Extend log message for unexpected socket() errors
Make sure the error code is included in the message logged for
unexpected socket creation errors in order to facilitate troubleshooting
on Windows.
2020-12-02 22:36:23 +01:00
Michal Nowak d7f2db0e91 Merge branch '2327-error-uv_wrap-h-no-such-file-or-directory-on-unit-gcc-tarball-ci-job' into 'main'
Add uv_wrap.h to libisctest_la_SOURCES

Closes #2327

See merge request isc-projects/bind9!4451
2020-12-02 15:09:45 +00:00
Michal Nowak 8499825525 Add uv_wrap.h to libisctest_la_SOURCES
uv_wrap.h is included in tcp_test.c and udp_test.c and therefore should
be listed in lib/isc/tests/Makefile.am, otherwise unit test run from
distribution tarball fails to compile:

tcp_test.c:37:10: fatal error: uv_wrap.h: No such file or directory
 #include "uv_wrap.h"
          ^~~~~~~~~~~

udp_test.c:37:10: fatal error: uv_wrap.h: No such file or directory
 #include "uv_wrap.h"
          ^~~~~~~~~~~
2020-12-02 16:08:18 +01:00