2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00
Commit Graph

30729 Commits

Author SHA1 Message Date
Ondřej Surý
fc9c7025bc Fail the autoconf script early if pkg-config is not present. 2020-01-14 14:07:36 +01:00
Ondřej Surý
4f74e75632 Merge branch 'ondrej/more-conversions-to-isc_refcount-API' into 'master'
Convert more reference counting to isc_refcount API

See merge request isc-projects/bind9!2153
2020-01-14 12:16:17 +00:00
Ondřej Surý
3000f14eba Use isc_refcount_increment0() when reusing handle or socket; remove extra DbC checks 2020-01-14 13:12:13 +01:00
Ondřej Surý
4d1e3b1e10 Move the NO_SANITIZE attribute to a correct place (gcc is picky) 2020-01-14 13:12:13 +01:00
Ondřej Surý
ede2208d96 ATOMIC_VAR_INIT() must be used only for static variables (C17) 2020-01-14 13:12:13 +01:00
Ondřej Surý
c4aec79079 When compiling with MSVC, use inline functions for isc_refcount_increment/decrement 2020-01-14 13:12:13 +01:00
Ondřej Surý
49976947ab Restore DbC checks in isc_refcount API
The isc_refcount API that provides reference counting lost DbC checks for
overflows and underflows in the isc_refcount_{increment,decrement} functions.

The commit restores the overflow check in the isc_refcount_increment and
underflows check in the isc_refcount_decrement by checking for the previous
value to not be on the boundary.
2020-01-14 13:12:13 +01:00
Ondřej Surý
a910b0a839 Protect globally accessed variables in rndc.c by making them C11 atomic 2020-01-14 13:12:13 +01:00
Ondřej Surý
64e2331843 Convert global responses variable in dispatch_test to C11 atomics 2020-01-14 13:12:13 +01:00
Ondřej Surý
6afa99362a Remove duplicate INSIST checks for isc_refcount API
This commits removes superfluous checks when using the isc_refcount API.

Examples of superfluous checks:

1. The isc_refcount_decrement function ensures there was not underflow,
   so this check is superfluous:

    INSIST(isc_refcount_decrement(&r) > 0);

2 .The isc_refcount_destroy() includes check whether the counter
   is zero, therefore this is superfluous:

    INSIST(isc_refcount_decrement(&r) == 1 && isc_refcount_destroy(&r));
2020-01-14 13:12:13 +01:00
Ondřej Surý
e711b0304f Convert more reference counting to isc_refcount API 2020-01-14 13:12:13 +01:00
Ondřej Surý
7c3e342935 Use isc_refcount_increment0() where appropriate 2020-01-14 13:12:13 +01:00
Ondřej Surý
9ce3254a1b Improve code style when checking old references values 2020-01-14 13:12:13 +01:00
Ondřej Surý
7dfc092f06 Use C11 atomics for nfctx, kill unused dns_resolver_nrunning() 2020-01-14 13:12:13 +01:00
Ondřej Surý
5208505f03 Use dns_keytable_attachkeynode() and switch to C11 atomics for .active_nodes 2020-01-14 13:12:13 +01:00
Ondřej Surý
fbf9856f43 Add isc_refcount_destroy() as appropriate 2020-01-14 13:12:13 +01:00
Witold Krecicki
4643ee04bd Merge branch 'wpk-netmgr-tcp-error-handling' into 'master'
netmgr: handle errors properly in accept_connection.

See merge request isc-projects/bind9!2880
2020-01-14 12:05:25 +00:00
Witold Krecicki
b665ce2a96 CHANGES 2020-01-14 11:06:02 +01:00
Witold Krecicki
6ee1461cc3 netmgr: handle errors properly in accept_connection.
If a connection was closed early (right after accept()) an assertion
that assumed that the connection was still alive could be triggered
in accept_connection. Handle those errors properly and not with
assertions, free all the resources afterwards.
2020-01-14 11:03:06 +01:00
Mark Andrews
0d4d65e7f2 Merge branch '1531-add-calls-to-dns_rdata_additionaldata-to-lib-dns-tests-rdata_test-c' into 'master'
Resolve "Add calls to dns_rdata_additionaldata to lib/dns/tests/rdata_test.c"

Closes #1531

See merge request isc-projects/bind9!2795
2020-01-14 04:44:58 +00:00
Mark Andrews
b3c1b2a869 exercise dns_rdata_checknames 2020-01-14 15:01:09 +11:00
Mark Andrews
649a34d628 exercise dns_rdata_additionaldata 2020-01-14 03:49:11 +00:00
Mark Andrews
5e74550740 call dns_rdata_towire on valid output from dns_rdata_fromtext and dns_rdata_fromwire 2020-01-14 03:49:11 +00:00
Evan Hunt
6ad0133156 Merge branch '1311-netmgr-stats' into 'master'
Resolve "netmgr doesn't count networking statistics"

Closes #1311

See merge request isc-projects/bind9!2844
2020-01-14 00:10:06 +00:00
Evan Hunt
c3ed086cf0 CHANGES 2020-01-13 14:09:42 -08:00
Evan Hunt
5234a8e00a count statistics in netmgr TCP code 2020-01-13 14:09:42 -08:00
Evan Hunt
90a1dabe74 count statistics in netmgr UDP code
- also restored a test in the statistics test which was changed when
  the netmgr was introduced because active sockets were not being
  counted.
2020-01-13 14:09:37 -08:00
Evan Hunt
80a5c9f5c8 associate socket stats counters with netmgr socket objects
- the socket stat counters have been moved from socket.h to stats.h.
- isc_nm_t now attaches to the same stats counter group as
  isc_socketmgr_t, so that both managers can increment the same
  set of statistics
- isc__nmsocket_init() now takes an interface as a paramter so that
  the address family can be determined when initializing the socket.
- based on the address family and socket type, a group of statistics
  counters will be associated with the socket - for example, UDP4Active
  with IPv4 UDP sockets and TCP6Active with IPv6 TCP sockets.  note
  that no counters are currently associated with TCPDNS sockets; those
  stats will be handled by the underlying TCP socket.
- the counters are not actually used by netmgr sockets yet; counter
  increment and decrement calls will be added in a later commit.
2020-01-13 14:05:02 -08:00
Witold Krecicki
a4ec0ccb91 Merge branch 'wpk-no-ipc-tcp-passing' into 'master'
Pass TCP listening sockets using async channel, not IPC

Closes #1433, #1499, and #1500

See merge request isc-projects/bind9!2825
2020-01-13 21:50:33 +00:00
Witold Kręcicki
7a7b09fee6 CHANGES note 2020-01-13 22:00:31 +01:00
Witold Kręcicki
20c077afc5 Disable pktinfo for ipv6 on all unices
If pktinfo were supported then we could listen on :: for ipv6 and get
the information about the destination address from pktinfo structure passed
in recvmsg but this method is not portable and libuv doesn't support it - so
we need to listen on all interfaces.
We should verify that this doesn't impact performance (we already do it for
ipv4) and either remove all the ipv6pktinfo detection code or think of fixing
libuv.
2020-01-13 22:00:20 +01:00
Evan Hunt
e38004457c netmgr fixes:
- use UV_{TC,UD}P_IPV6ONLY for IPv6 sockets, keeping the pre-netmgr
   behaviour.
 - add a new listening_error bool flag which is set if the child
   listener fails to start listening. This fixes a bug where named would
   hang if, e.g.,  we failed to bind to a TCP socket.
2020-01-13 10:54:17 -08:00
Witold Kręcicki
67c1ca9a79 Use isc_uv_export() to pass bound TCP listening socket to child listeners.
For multithreaded TCP listening we need to pass a bound socket to all
listening threads. Instead of using uv_pipe handle passing method which
is quite complex (lots of callbacks, each of them with its own error
handling) we now use isc_uv_export() to export the socket, pass it as a
member of the isc__netievent_tcpchildlisten_t structure, and then
isc_uv_import() it in the child thread, simplifying the process
significantly.
2020-01-13 10:53:44 -08:00
Witold Kręcicki
c6c0a9fdba Add isc_uv_export()/isc_uv_import() functions to libuv compatibility layer.
These functions can be used to pass a uv handle between threads in a
safe manner. The other option is to use uv_pipe and pass the uv_handle
via IPC, which is way more complex.  uv_export() and uv_import() functions
existed in libuv at some point but were removed later. This code is
based on the original removed code.

The Windows version of the code uses two functions internal to libuv;
a patch for libuv is attached for exporting these functions.
2020-01-13 10:52:07 -08:00
Michal Nowak
ab1adcca98 Merge branch 'mnowak/add-openSUSE-Tumblewed-image' into 'master'
Add openSUSE Tumbleweed image to the CI

Closes #1303

See merge request isc-projects/bind9!2826
2020-01-13 16:26:06 +00:00
Michal Nowak
3526c73062 Add openSUSE Tumbleweed image to the CI
Ensure BIND is continuously tested on Tumbleweed, a pure rolling release
version of openSUSE.  This will allow BIND incompatibilities with latest
upstream versions of its dependencies to be caught more quickly.
2020-01-13 16:26:05 +00:00
Michał Kępień
7787de80ca Merge branch '1552-properly-detect-mmdb-lookup-failures' into 'master'
Properly detect MMDB lookup failures

Closes #1552

See merge request isc-projects/bind9!2864
2020-01-13 13:55:54 +00:00
Michał Kępień
aa96ec25c8 Add CHANGES entry
5339.	[bug]		With some libmaxminddb versions, named could erroneously
			match an IP address not belonging to any subnet defined
			in a given GeoIP2 database to one of the existing
			entries in that database. [GL #1552]
2020-01-13 14:32:19 +01:00
Michał Kępień
ec8334fb74 Properly detect MMDB lookup failures
Only comparing the value of the integer passed as the last argument to
MMDB_lookup_sockaddr() against MMDB_SUCCESS is not enough to ensure that
an MMDB lookup was successful - the 'found_entry' field of the
MMDB_lookup_result_s structure returned by that function also needs to
be true or else the remaining contents of that structure should be
ignored as the lookup failed.  Extend the relevant logical condition in
get_entry_for() to ensure the latter does not return incorrect MMDB
entries for IP addresses which do not belong to any subnet defined in a
given GeoIP2 database.
2020-01-13 14:32:19 +01:00
Ondřej Surý
8797d8ad08 Merge branch '1507-warning-threadsanitizer-data-race-lib-isc-tests-socket_test-simple' into 'master'
Address dns_zt_asyncload races by properly using isc_reference_*.

Closes #1507

See merge request isc-projects/bind9!2870
2020-01-13 11:11:11 +00:00
Mark Andrews
72f0e01f5d Address dns_zt_asyncload races by properly using isc_reference_*. 2020-01-13 11:33:31 +01:00
Ondřej Surý
423a627946 Merge branch 'doc-binaryflesh' into 'master'
Update documentation pertaining to platform support

See merge request isc-projects/bind9!2786
2020-01-13 10:32:51 +00:00
Logan Campos
42384f367a update windows versions supported 2020-01-13 11:08:18 +01:00
Logan Campos
6056efc3ce make commit-arm executable 2020-01-13 11:08:18 +01:00
Ondřej Surý
2eaab4042b Update copyrights 2020-01-13 11:08:18 +01:00
Logan Campos
c17783b99e make git aware XML docbooks are only asset ARM needs to track 2020-01-13 11:08:18 +01:00
Logan Campos
343c6d357c update platform compatiblity documentation 2020-01-13 11:08:18 +01:00
Logan Campos
933df7b31c change context of WWW to HTTP 2020-01-13 11:08:17 +01:00
Logan Campos
136dcfd692 Update dated platform compatibility documentation. 2020-01-13 11:08:17 +01:00
Ondřej Surý
98136164aa Merge branch '1555-code-with-pthread-specific-semantics-is-not-portable' into 'master'
Resolve "Code with pthread specific semantics is not portable"

Closes #1555

See merge request isc-projects/bind9!2868
2020-01-13 08:54:54 +00:00