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

32901 Commits

Author SHA1 Message Date
Mark Andrews
9a5aa8cf3a Merge branch '2239-fctx-id-is-uninitialized-and-effectively-unused' into 'main'
Resolve "fctx:id is uninitialized and effectively unused"

Closes #2239

See merge request isc-projects/bind9!4346
2020-11-06 02:26:11 +00:00
Mark Andrews
ed783a8139 remove fctx:id field 2020-11-06 01:54:44 +00:00
Michal Nowak
d7308c86a6 Merge branch '1728-drop-big-key' into 'main'
Drop bigkey

Closes #1728

See merge request isc-projects/bind9!4350
2020-11-05 16:25:32 +00:00
Michal Nowak
ef6703351a Drop bigkey
The 'bigkey' binary is not used anywhere, therefor it's sources should
be removed.
2020-11-05 17:17:14 +01:00
Michał Kępień
cec8493af5 Merge branch 'michal/miscellaneous-windows-tweaks' into 'main'
Miscellaneous Windows tweaks

Closes images#10

See merge request isc-projects/bind9!4354
2020-11-05 14:06:43 +00:00
Michał Kępień
64a091d587 Fix detection of CMake-built libuv on Windows
As of libuv 1.36.0, CMake is the only supported build method for libuv
on Windows.  Account for that fact by adjusting the relevant paths and
DLL file names used in the win32utils/Configure script.  Update
Windows-specific documentation accordingly.
2020-11-05 11:45:19 +01:00
Michał Kępień
004ca913f2 Use "image" key in Windows GitLab CI job templates
Our GitLab Runner Custom executor scripts now use the "image" key for
determining the Windows Docker image to use for a given CI job.  Update
.gitlab-ci.yml to reflect that change.
2020-11-05 11:45:19 +01:00
Michał Kępień
f54e2e623b Merge branch 'michal/rpz-system-test-fix-fast-expire' into 'main'
"rpz" system test: fix intermittent false positive (expired RPZ zone)

See merge request isc-projects/bind9!4357
2020-11-05 07:03:30 +00:00
Michał Kępień
39191052ad Wait for the "fast-expire" zone to be transferred
In order for a "fast-expire/IN: response-policy zone expired" message to
be logged in ns3/named.run, the "fast-expire" zone must first be
transferred in by that server.  However, with unfavorable timing, ns3
may be stopped before it manages to fetch the "fast-expire" zone from
ns5 and after the latter has been reconfigured to no longer serve that
zone.  In such a case, the "rpz" system test will report a false
positive for the relevant check.  Prevent that from happening by
ensuring ns3 manages to transfer the "fast-expire" zone before getting
shut down.
2020-11-05 07:53:43 +01:00
Mark Andrews
31b49a82d7 Merge branch '2243-cid-312970-incorrect-expression-copy_paste_error-in-tcp-c' into 'main'
Resolve "CID 312970: Incorrect expression (COPY_PASTE_ERROR) in tcp.c"

Closes #2243

See merge request isc-projects/bind9!4355
2020-11-05 00:32:06 +00:00
Mark Andrews
0073cb7356 Incorrect result code passed to failed_connect_cb
*** CID 312970:  Incorrect expression  (COPY_PASTE_ERROR) /lib/isc/netmgr/tcp.c: 282 in tcp_connect_cb()
    276     	}
    277
    278     	isc__nm_incstats(sock->mgr, sock->statsindex[STATID_CONNECT]);
    279     	r = uv_tcp_getpeername(&sock->uv_handle.tcp, (struct sockaddr *)&ss,
    280     			       &(int){ sizeof(ss) });
    281     	if (r != 0) {
    >>>     CID 312970:  Incorrect expression  (COPY_PASTE_ERROR)
    >>>     "status" in "isc___nm_uverr2result(status, true, "netmgr/tcp.c", 282U)" looks like a copy-paste error.
    282     		failed_connect_cb(sock, req, isc__nm_uverr2result(status));
    283     		return;
    284     	}
    285
    286     	atomic_store(&sock->connecting, false);
    287
2020-11-04 21:58:05 +00:00
Matthijs Mekking
1299630324 Merge branch 'matthijs-test-multi-signer-model' into 'main'
Add a test for RFC 8901 signer model 2

See merge request isc-projects/bind9!4306
2020-11-04 13:27:22 +00:00
Matthijs Mekking
518dd0bb17 kasp test: Use DEFAULT_ALGORITHM in tests.sh
Some setup scripts uses DEFAULT_ALGORITHM in their dnssec-policy
and/or initial signing. The tests still used the literal values
13, ECDSAP256SHA256, and 256. Replace those occurrences where
appropriate.
2020-11-04 12:41:25 +01:00
Matthijs Mekking
7e0ec9f624 Add a test for RFC 8901 signer model 2
The new 'dnssec-policy' was already compatible with multi-signer
model 2, now we also have a test for it.
2020-11-04 12:40:04 +01:00
Mark Andrews
5a8d95ea2a Merge branch '2244-nta-related-crash-after-reconfiguring-views' into 'main'
Resolve "NTA-related crash after reconfiguring views"

Closes #2244

See merge request isc-projects/bind9!4345
2020-11-03 12:47:43 +00:00
Mark Andrews
2ef0f252a8 Add CHANGES for [GL #2244] 2020-11-03 12:29:04 +00:00
Mark Andrews
ea956976d1 Call nta_detach() before dns_view_weakdetach() so view is available. 2020-11-03 12:29:04 +00:00
Mark Andrews
1be2a83c67 Merge branch 'marka-fixup-dnssec' into 'main'
dnssec system test needs python and perl

See merge request isc-projects/bind9!4342
2020-11-03 00:48:58 +00:00
Mark Andrews
40ae128922 dnssec system test needs python and perl 2020-11-03 11:22:36 +11:00
Ondřej Surý
3ec9b5f1d9 Merge branch '2227-tcp-connection-closed-second-fix' into 'main'
Fix improper closed connection handling in tcpdns.

Closes #2227

See merge request isc-projects/bind9!4341
2020-11-02 22:52:01 +00:00
Ondřej Surý
c14c1fdd2c Put up additional safe guards to not use inactive/closed tcpdns socket
When we are operating on the tcpdns socket, we need to double check
whether the socket or its outerhandle or its listener or its mgr is
still active and when not, bail out early.
2020-11-02 20:58:00 +01:00
Ondřej Surý
cea4b4db8f Add CHANGES note for [GL #2227] 2020-11-02 15:10:28 +01:00
Witold Kręcicki
3ab3d90de0 Fix improper closed connection handling in tcpdns.
If dnslisten_readcb gets a read callback it needs to verify that the
outer socket wasn't closed in the meantime, and issue a CANCELED callback
if it was.
2020-11-02 15:10:28 +01:00
Michał Kępień
f8730ae1a2 Merge branch '2237-placeholder' into 'main'
Add placeholder for #2237

See merge request isc-projects/bind9!4343
2020-11-02 11:25:30 +00:00
Michał Kępień
2a33e5bf60 Add placeholder for #2237 2020-11-02 12:24:11 +01:00
Ondřej Surý
c933fa8d47 Merge branch '2235-add-netmgr-functions-to-support-outgoing-dns-queries' into 'main'
Resolve "Add netmgr functions to support outgoing DNS queries"

Closes #2235

See merge request isc-projects/bind9!4318
2020-10-30 13:40:18 +00:00
Evan Hunt
3a2dc05c92 CHANGES 2020-10-30 11:11:54 +01:00
Evan Hunt
8fcad58ea6 check return value from uv_tcp_getpeername() when connecting
if we can't determine the peer, the connect should fail.
2020-10-30 11:11:54 +01:00
Ondřej Surý
14f54d13dc add a netmgr unit test
tests of UDP and TCP cases including:
- sending and receiving
- closure sockets without reading or sending
- closure of sockets at various points while sending and receiving
- since the teste is multithreaded, cmocka now aborts tests on the
  first failure, so that failures in subthreads are caught and
  reported correctly.
2020-10-30 11:11:54 +01:00
Evan Hunt
26a3a22895 set REUSEPORT and REUSEADDR on TCP sockets if needed
When binding a TCP socket, if bind() fails with EADDRINUSE,
try again with REUSEPORT/REUSEADDR (or the equivalent options).
2020-10-30 11:11:54 +01:00
Ondřej Surý
ed3ab63f74 Fix more races between connect and shutdown
There were more races that could happen while connecting to a
socket while closing or shutting down the same socket.  This
commit introduces a .closing flag to guard the socket from
being closed twice.
2020-10-30 11:11:54 +01:00
Ondřej Surý
6cfadf9db0 Fix a race between isc__nm_async_shutdown() and new sends/reads
There was a data race where a new event could be scheduled after
isc__nm_async_shutdown() had cleaned up all the dangling UDP/TCP
sockets from the loop.
2020-10-30 11:11:54 +01:00
Ondřej Surý
5fcd52209a Refactor udp_recv_cb()
- more logical code flow.
- propagate errors back to the caller.
- add a 'reading' flag and call the callback from failed_read_cb()
  only when it the socket was actively reading.
2020-10-30 11:11:54 +01:00
Ondřej Surý
cdccac4993 Fix netmgr read/connect timeout issues
- don't bother closing sockets that are already closing.
- UDP read timeout timer was not stopped after reading.
- improve handling of TCP connection failures.
2020-10-30 11:11:54 +01:00
Ondřej Surý
7a6056bc8f Add isc__nm_udp_shutdown() function
This function will be called during isc_nm_closedown() to ensure
that all UDP sockets are closed and detached.
2020-10-30 11:11:54 +01:00
Evan Hunt
5dcdc00b93 add netmgr functions to support outgoing DNS queries
- isc_nm_tcpdnsconnect() sets up up an outgoing TCP DNS connection.
- isc_nm_tcpconnect(), _udpconnect() and _tcpdnsconnect() now take a
  timeout argument to ensure connections time out and are correctly
  cleaned up on failure.
- isc_nm_read() now supports UDP; it reads a single datagram and then
  stops until the next time it's called.
- isc_nm_cancelread() now runs asynchronously to prevent assertion
  failure if reading is interrupted by a non-network thread (e.g.
  a timeout).
- isc_nm_cancelread() can now apply to UDP sockets.
- added shim code to support UDP connection in versions of libuv
  prior to 1.27, when uv_udp_connect() was added

all these functions will be used to support outgoing queries in dig,
xfrin, dispatch, etc.
2020-10-30 11:11:54 +01:00
Michał Kępień
2111ea05cd Merge branch 'mnowak/OpenBSD_6.8' into 'main'
Add OpenBSD 6.8

See merge request isc-projects/bind9!4298
2020-10-30 09:39:33 +00:00
Michal Nowak
773649f413 Update to OpenBSD 6.8 2020-10-30 10:11:06 +01:00
Michal Nowak
fa1f00affe Merge branch 'mnowak/add-freebsd12.2' into 'main'
Update to FreeBSD 12.2

See merge request isc-projects/bind9!4323
2020-10-29 15:01:23 +00:00
Michal Nowak
11ab0528d9 Update to FreeBSD 12.2 2020-10-29 16:00:22 +01:00
Michal Nowak
9190b1ed18 Merge branch 'mnowak/add-fedora-33' into 'main'
Add Fedora 33

See merge request isc-projects/bind9!4326
2020-10-29 14:45:04 +00:00
Michal Nowak
b1e17e475a Add Fedora 33 2020-10-29 15:37:45 +01:00
Mark Andrews
e9b6747888 Merge branch '2236-resolver-sometimes-treats-signed-insecure-zone-with-broken-dnskey-as-bogus' into 'main'
Resolve "Resolver sometimes treats signed, insecure zone with broken DNSKEY as bogus"

Closes #2236

See merge request isc-projects/bind9!4319
2020-10-29 13:46:53 +00:00
Mark Andrews
decf117eb6 Add CHANGES note for [GL #2236] 2020-10-30 00:18:03 +11:00
Mark Andrews
d7840f4b93 Check that a zone in the process of being signed resolves
ans10 simulates a local anycast server which has both signed and
unsigned instances of a zone.  'A' queries get answered from the
signed instance.  Everything else gets answered from the unsigned
instance.  The resulting answer should be insecure.
2020-10-30 00:17:24 +11:00
Mark Andrews
718e597def Handle DNS_R_NCACHENXRRSET in fetch_callback_{dnskey,validator}()
DNS_R_NCACHENXRRSET can be return when zones are in transition state
from being unsigned to signed and signed to unsigned.  The validation
should be resumed and should result in a insecure answer.
2020-10-30 00:17:24 +11:00
Ondřej Surý
d9f3220424 Merge branch '2227-tcp-connection-closed-fix' into 'main'
Properly handle outer TCP connection closed in TCPDNS.

Closes #2227

See merge request isc-projects/bind9!4309
2020-10-29 12:21:05 +00:00
Witold Kręcicki
cd3117b747 Add CHANGES and release note for GL #2227 2020-10-29 12:34:00 +01:00
Witold Kręcicki
c41ce8e0c9 Properly handle outer TCP connection closed in TCPDNS.
If the connection is closed while we're processing the request
we might access TCPDNS outerhandle which is already reset. Check
for this condition and call the callback with ISC_R_CANCELED result.
2020-10-29 12:32:25 +01:00
Evan Hunt
0241d9ddc8 Merge branch 'each-rpz-test-typo' into 'main'
fix a typo in rpz test

See merge request isc-projects/bind9!4320
2020-10-29 05:33:40 +00:00