Ondřej Surý
e1ce3a3d42
Define __ADDRESS_SANITIZER__ if compiling under clang's AddressSanitizer
2018-12-19 09:54:37 +01:00
Ondřej Surý
953a957dfa
Just #define isc_refcount_increment0() to isc_refcount_increment()
2018-12-05 14:16:41 +01:00
Ondřej Surý
8537adef4c
The isc_refcount_decrement must use memory_order_release and isc_refcount_destroy must run thread barrier with memory_order_require
2018-12-05 14:11:53 +01:00
Mark Andrews
a487473fc5
add missing DBC checks for catz and add isc_magic checks; add DBC checks to ht.c
2018-11-29 12:39:20 +11:00
Witold Kręcicki
d5793ecca2
- isc_task_create_bound - create a task bound to specific task queue
...
If we know that we'll have a task pool doing specific thing it's better
to use this knowledge and bind tasks to task queues, this behaves better
than randomly choosing the task queue.
- use bound resolver tasks - we have a pool of tasks doing resolutions,
we can spread the load evenly using isc_task_create_bound
- quantum set universally to 25
2018-11-23 04:34:02 -05:00
Ondřej Surý
3987a146be
Remove isc_mem_{set,get}quota unused functions
2018-11-22 16:46:56 +01:00
Witold Kręcicki
929ea7c2c4
- Make isc_mutex_destroy return void
...
- Make isc_mutexblock_init/destroy return void
- Minor cleanups
2018-11-22 11:52:08 +00:00
Ondřej Surý
d940e95206
isc_quota_init now returns 'void'
2018-11-22 11:52:08 +00:00
Ondřej Surý
2f3eee5a4f
isc_mutex_init returns 'void'
2018-11-22 11:51:49 +00:00
Witold Kręcicki
bd024eee57
Add runtime detection of SO_REUSEPORT, use it instead of dup() if available.
2018-11-15 08:21:17 +00:00
Witold Krecicki
6feb688f69
Use multiple network event loop threads with separate data structures.
2018-11-15 08:21:17 +00:00
Witold Kręcicki
778ab8158a
Remove fdwatch sockets, those are not used anywhere.
2018-11-15 08:21:17 +00:00
Ondřej Surý
5e44a1008f
Define STATIC_ASSERT(cond, msg) to be _Static_assert(cond, msg) everywhere but on Windows where it stays to be INSIST(cond)
2018-11-14 18:18:27 -05:00
Ondřej Surý
68ca987792
Remove dummy ISLOCKED macro
2018-11-08 12:22:26 +07:00
Ondřej Surý
a831e0f72d
When ISC assertions are disabled, still execute the condition to prevent unused variable warnings/errors from the compiler
2018-11-08 12:21:53 +07:00
Ondřej Surý
b2b43fd235
Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool
2018-11-08 12:21:53 +07:00
Ondřej Surý
fbd2e47f51
Add small tweaks to the code to fix compilation when ISC assertions are disabled
...
While implementing the new unit testing framework cmocka, it was found that the
BIND 9 code doesn't compile when assertions are disabled or replaced with any
function (such as mock_assert() from cmocka unit testing framework) that's not
directly recognized as assertion by the compiler.
This made the compiler to complain about blocks of code that was recognized as
unreachable before, but now it isn't.
The changes in this commit include:
* assigns default values to couple of local variables,
* moves some return statements around INSIST assertions,
* adds __builtin_unreachable(); annotations after some INSIST assertions,
* fixes one broken assertion (= instead of ==)
2018-11-08 12:21:53 +07:00
Witold Kręcicki
f166cabcae
Document isc_task_sendto properly, make sure that cpu we're sending to is always sane
2018-11-06 08:19:50 +00:00
Witold Kręcicki
c80e25e482
Get rid of isc_taskmgr_setmode, we only use it to set privileged mode
2018-11-06 08:19:50 +00:00
Witold Kręcicki
81a85070c5
Multiple worker queues
2018-11-06 08:19:50 +00:00
Witold Kręcicki
54b9690a4e
Remove vector socket functions from Unix socket code and library headers
...
Remove the following functions in order to simplify socket code:
- isc_socket_recvv()
- isc_socket_sendtov()
- isc_socket_sendtov2()
- isc_socket_sendv()
2018-10-31 12:12:53 +01:00
Evan Hunt
b27630a130
remove config.h references
2018-10-30 10:42:41 -07:00
Mark Andrews
97a680e5ce
document eol
2018-10-30 11:03:02 +11:00
Evan Hunt
dfe5d3330c
added stdatomic.h and md.h
2018-10-29 11:26:38 -07:00
Ondřej Surý
d6c50674bb
Remove last traces of DSA and NSEC3DSA algorithm, but restore the algnumber -> name mapping
2018-10-26 11:50:11 +02:00
Ondřej Surý
b98ac2593c
Add generic hashed message authentication code API (isc_hmac) to replace specific HMAC functions hmacmd5/hmacsha1/hmacsha2...
2018-10-25 08:15:42 +02:00
Ondřej Surý
7fd3dc63de
Add generic message digest API (isc_md) to replace specific MD functions md5/sha1/sha256
2018-10-25 08:15:42 +02:00
Evan Hunt
e839972ee2
address unresolved externals
2018-10-19 00:49:53 -07:00
Evan Hunt
09f58ab63f
retain a minimal "methods" struct in the mctx
...
- this enables memory to be allocated and freed in dyndb modules
when named is linked statically. when we standardize on libtool,
this should become unnecessary.
- also, simplified the isc_mem_create/createx API by removing
extra compatibility functions
2018-10-18 09:19:12 +00:00
Evan Hunt
0e86fa16e8
complete removal of a few unneeded functions
...
- removed register functions from isc_app, isc_timer, isc_task
- added a task_p.h header for use by unit tests
2018-10-18 09:19:12 +00:00
Witold Kręcicki
38a127c35b
Remove layering from isc_task, isc_app, isc_socket, isc_timer, isc_mem
2018-10-18 09:19:12 +00:00
Witold Kręcicki
cdbac34cba
Get rid of isc_bind9 conditional
2018-10-18 09:19:12 +00:00
Ondřej Surý
3994b1f9c2
Remove support for obsoleted and insecure DSA and DSA-NSEC3-SHA1 algorithms
2018-10-05 09:21:43 +02:00
Mark Andrews
f723a1247f
Undo implict promotion to 64 bits in our Windows implementation of atomic_load_explicit() by casting to uint_fast32_t.
2018-10-04 06:59:28 +10:00
Mark Andrews
81b133d963
avoid macro name collision with system defined macro
2018-09-10 09:18:17 +10:00
Ondřej Surý
4d46f0f95d
Drop ISC_PLATFORM_USEDECLSPEC and IRS_PLATFORM_USEDECLSPEC as they are platform dependent and only unix vs win32 platform.h header difference is enough
2018-09-07 12:17:30 +02:00
Ondřej Surý
51b0d5d55e
Replace platform ISC_PLATFORM_HAVESTATNSEC with config ENABLE_STAT_NSEC
2018-09-07 12:17:30 +02:00
Ondřej Surý
f1d3055d7b
Replace platform ISC_PLATFORM_HAVETFO with config ENABLE_TCP_FASTOPEN
2018-09-07 12:17:30 +02:00
Ondřej Surý
092edb5b44
Replace platform ISC_PLATFORM_HAVEDEVPOLL with check for devpoll.h headers
2018-09-07 12:17:30 +02:00
Ondřej Surý
5d65392d18
Replace platform ISC_PLATFORM_HAVEEPOLL with config HAVE_EPOLL_CREATE1
2018-09-07 12:17:30 +02:00
Ondřej Surý
68f473a25e
Replace platform ISC_PLATFORM_HAVEKQUEUE with config HAVE_KQUEUE
2018-09-07 12:17:30 +02:00
Ondřej Surý
d00ef56dfa
Remove dummy ISC_PLATFORM_HAVESTRINGSH platform define
2018-09-07 12:17:30 +02:00
Ondřej Surý
47f18c7d50
Replace platform ISC_PLATFORM_NEEDSTRLCPY and ISC_PLATFORM_NEEDSTRLCAT with AC_CHECK_FUNCS call
2018-09-07 12:17:30 +02:00
Ondřej Surý
4014bc42dd
According to POSIX.1-2001, POSIX.1-2008 #include <sys/select.h> is correct way to get fd_set
2018-09-07 12:17:30 +02:00
Ondřej Surý
1333d4a71a
Remove dummy ISC_PLATFORM_HAVELIFCONF platform define
2018-09-07 12:17:30 +02:00
Ondřej Surý
0bea5c2baf
Replace platform.h ISC_PLATFORM_HAVEIFNAMETOINDEX with config HAVE_IF_NAMETOINDEX
2018-09-07 12:17:30 +02:00
Ondřej Surý
53d87175df
Remove dummy ISC_PLATFORM_HAVEIF_LADDRREQ platform define
2018-09-07 12:17:30 +02:00
Ondřej Surý
c798db0fcd
Remove dummy ISC_PLATFORM_HAVEIF_LADDRCONF define
2018-09-07 12:17:30 +02:00
Ondřej Surý
f8635fd719
Remove dummy ISC_PLATFORM_NEEDSTRCASESTR define from platform.h
2018-09-07 12:17:30 +02:00
Ondřej Surý
22e5231f99
Remove ISC_PLATFORM_BUSYWAITNOP in favour of direct isc_rwlock_pause() define
2018-09-07 12:17:29 +02:00
Ondřej Surý
510bb376e1
Define platform.h ISC_PLATFORM_USEBACKTRACE with config.h USE_BACKTRACE
2018-09-07 12:17:29 +02:00
Witold Kręcicki
17212cf996
Align CMSG buffers to a void* boundary, fixes crash on architectures with strict alignment
...
CHANGES entry
2018-09-07 09:34:32 +02:00
Ondřej Surý
142cb0ab8f
Remove already removed headers from the Makefiles
2018-09-03 12:09:52 +02:00
Ondřej Surý
25248eb097
Bail-out early in the for install loops instead of continuing because for masks the error in the middle
2018-09-03 12:05:45 +02:00
Witold Krecicki
d932ec871c
Silence some warnings and errors
2018-08-31 13:48:26 -07:00
Ondřej Surý
aa3e33575d
Fixup Windows build after strerr changes
2018-08-29 21:21:52 +02:00
Evan Hunt
1656152d76
Ensure that POSIX strerror_r variant is use even when _GNU_SOURCE is enabled by default
2018-08-29 13:31:28 +02:00
Ondřej Surý
dc410ce58f
Remove broken @ISC_IPV6_H@ placeholder from Makefile.in
2018-08-28 21:15:32 +02:00
Ondřej Surý
91aa405778
Update the isc_refcount documentation in doxygen format
2018-08-28 13:15:59 +02:00
Ondřej Surý
d1d15c03e2
Switch everything back to relaxed memory ordering
2018-08-28 12:15:39 +02:00
Ondřej Surý
bef8ac5bae
Rewrite isc_refcount API to fetch_and_<op>, instead of former <op>_and_<fetch>
2018-08-28 12:15:39 +02:00
Ondřej Surý
0a7535ac81
isc_refcount_init() now doesn't return isc_result_t and asserts on failed initialization
2018-08-28 12:15:39 +02:00
Ondřej Surý
e9e55cbd03
Remove isc_atomic usage from rwlock.c and stats.c
2018-08-28 12:15:39 +02:00
Ondřej Surý
e119de4169
Replace arch specific atomic.h with global atomic.h header using either stdatomic, __atomic or __sync primitives
2018-08-28 12:15:39 +02:00
Ondřej Surý
facc390b54
Update configure.in to check for both stdatomic.h and __atomic builtins
2018-08-28 12:15:39 +02:00
Ondřej Surý
f1d658764c
Remove dead check for long long support
2018-08-28 10:31:49 +02:00
Ondřej Surý
52e1c45156
Assume PTHREAD_ONCE_INIT is not broken (remove support for ancient Solaris)
2018-08-28 10:31:48 +02:00
Ondřej Surý
1672935717
Use strerror_r from POSIX.1-2001 (strerror_s on Windows) instead of custom isc__strerror()
2018-08-28 10:31:48 +02:00
Ondřej Surý
efd613e874
memmove, strtoul, and strcasestr functions are part of ISO C90, remove the compatibility shim
2018-08-28 10:31:48 +02:00
Ondřej Surý
29c853f500
Remove check for isc_port_t; Windows never have it, Unix always have it
2018-08-28 10:31:48 +02:00
Ondřej Surý
40f7680efa
Ignore sockaddr_{sin,sin6,sun}.{sin,sin6,sun}_len even on systems that define it
2018-08-28 10:31:48 +02:00
Ondřej Surý
e6dc08b06c
Always assume BSD4.4 msghdr version
2018-08-28 10:31:48 +02:00
Ondřej Surý
388d6db5a1
Remove support for legacy systems without inet_{ntop,pton} w/ IPv6 support
2018-08-28 10:31:48 +02:00
Ondřej Surý
3ab9c99567
Remove support for legacy systems without in6_pktinfo
2018-08-28 10:31:48 +02:00
Ondřej Surý
8c526df306
Remove support for legacy systems without sin6_scope_id
2018-08-28 10:31:48 +02:00
Ondřej Surý
4150a86046
Remove support for legacy platforms without in6addr_loopback
2018-08-28 10:31:48 +02:00
Ondřej Surý
5083a42072
Remove support for legacy systems without in6addr_any
2018-08-28 10:31:48 +02:00
Ondřej Surý
b962f47d3e
Remove support for pre-RFC2133 IPv6 implementation (in_addr6)
2018-08-28 10:31:48 +02:00
Ondřej Surý
7b21bbb7c1
Require IPv6 support from the OS
2018-08-28 10:31:47 +02:00
Ondřej Surý
b02de1ec30
Remove legacy support for SunOS
2018-08-28 10:31:47 +02:00
Ondřej Surý
18e3c8d232
Remove legacy support for Tru64
2018-08-28 10:31:47 +02:00
Ondřej Surý
9a8da1e25a
Remove legacy BSD/OS support (ipv6,various hacks)
2018-08-28 10:31:47 +02:00
Ondřej Surý
e53a72a649
Remove legacy UnixWare support (sigwait, ipv6)
2018-08-28 10:31:47 +02:00
Witold Kręcicki
5cdb38c2c7
Remove unthreaded support
2018-08-16 17:18:52 +02:00
Mathieu Arnold
4c06eb20cc
Don't try to install removed int.h and boolean.h headers
2018-08-13 15:30:36 +02:00
Ondřej Surý
994e656977
Replace custom isc_boolean_t with C standard bool type
2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69
Replace custom isc_u?intNN_t types with C99 u?intNN_t types
2018-08-08 09:37:28 +02:00
Ondřej Surý
64fe6bbaf2
Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants
2018-08-08 09:36:44 +02:00
Ondřej Surý
20faf4652a
Change isc_buffer_reallocate() into a static functions as it is not used outside of isc_buffer_reserve()
2018-07-31 22:00:30 +02:00
Ondřej Surý
b105ccee68
Remove isc_safe_memcompare, it's not needed anywhere and can't be replaced with CRYPTO_memcmp()
2018-07-20 10:06:14 -04:00
Ondřej Surý
66ba2fdad5
Replace isc_safe routines with their OpenSSL counter parts
2018-07-20 00:34:26 -04:00
Mark Andrews
4c3386ad95
remove lib/isc/print.c and lib/isc/tests/print_test.c
2018-07-19 23:24:28 -04:00
Ondřej Surý
fc496b2b5d
Fix DH and ECDSA algorithms in PKCS#11 build
2018-07-19 14:00:40 -04:00
Ondřej Surý
c3b8130fe8
Make OpenSSL mandatory
2018-07-19 12:47:03 -04:00
Ondřej Surý
45bee4d3c3
Cleanup cmocka related whitespace
2018-06-21 12:20:07 +02:00
Ondřej Surý
52731c000d
Add support for cmocka assert testing by overriding REQUIRE/INSIST/... macros when UNIT_TESTING is defined
2018-06-20 06:30:07 -04:00
Ondřej Surý
8ee23a47e8
Add better EMPTY_TRANSLATION_UNIT to isc/util.h
2018-06-14 17:58:03 -04:00
Ondřej Surý
b4aa7a9d7e
Remove entropy.h from Makefile.in
2018-06-06 14:36:33 +02:00
Ondřej Surý
27593e65dc
Remove support for obsoleted ECC-GOST (GOST R 34.11-94) algorithm
2018-06-05 09:14:14 +02:00
Ondřej Surý
28e0b2c4c4
Use isc int types to be able to build with old VS
2018-05-30 06:26:05 +02:00