2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

1530 Commits

Author SHA1 Message Date
Mark Andrews
cb913177ae improve clang / cmocka integration 2019-03-05 10:20:29 -08:00
Ondřej Surý
3a3e75042d Remove support for compiling without assertions (Both ISC_CHECK_ALL, ISC_CHECK_NONE are now gone) 2019-01-31 11:16:08 +01:00
Evan Hunt
39527e9c36 Moved the unix version to lib/isc/unix/include/isc so it's more obvious in the future that it isn't the only copy 2019-01-30 09:37:38 +01:00
Witold Kręcicki
a003908af4 Fix a race in access to manager->tasks in taskmgr
Make taskmgr->mode and boolean state flags (exclusive, paused, exiting) atomic.
2019-01-29 03:32:29 -05:00
Evan Hunt
995134ce76 rename struct members to avoid a name collision on BSD 2019-01-28 10:59:48 -08:00
Witold Kręcicki
0af500a2c5 - Make isc_quota use atomics instead of locks
- Use getters for isc_quota parameters, make fields private
- Fix a potential data race with recursion clients limits logging
2019-01-25 04:26:49 -05:00
Witold Kręcicki
814bfa23b2 Add atomic_store_relaxed and atomic_load_relaxed macros to isc/atomic.h, fix issues in isc/stdatomic.h 2019-01-25 04:26:49 -05:00
Ondřej Surý
e2cdf066ea Remove message catalogs 2019-01-09 23:44:26 +01:00
Mark Andrews
5e8b772ad1 Ensure base64/base32/hex fields in DNS records that should be non-empty are. 2019-01-09 18:04:21 +11:00
Ondřej Surý
ff7c868f25 __SANITIZE_ADDRESS__ needs to be defined to 1 2018-12-19 22:02:37 +01:00
Ondřej Surý
8903d68d69 gcc defines __SANITIZE_ADDRESS__ and not __ADDRESS_SANITIZER__, use the correct #define 2018-12-19 12:24:59 +01:00
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ý
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
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