784 Commits
Author SHA1 Message Date
Diego FronzaandOndřej Surý faf3cbe62d Add functions for collecting high-water counters
Add {isc,ns}_stats_{update_if_greater,get_counter}() functions that
are used to set and collect high-water type of statistics.

(cherry picked from commit a544e2e300)
2019-11-06 11:26:22 +01:00
Mark Andrews fcebc4f15b Address cppcheck reports 2019-10-04 13:06:00 +10:00
Michał Kępień 78a3cacf8d Make VS solution upgrading unnecessary
Until now, the build process for BIND on Windows involved upgrading the
solution file to the version of Visual Studio used on the build host.
Unfortunately, the executable used for that (devenv.exe) is not part of
Visual Studio Build Tools and thus there is no clean way to make that
executable part of a Windows Server container.

Luckily, the solution upgrade process boils down to just adding XML tags
to Visual Studio project files and modifying certain XML attributes - in
files which we pregenerate anyway using win32utils/Configure.  Thus,
extend win32utils/Configure with three new command line parameters that
enable it to mimic what "devenv.exe bind9.sln /upgrade" does.  This
makes the devenv.exe build step redundant and thus facilitates building
BIND in Windows Server containers.

(cherry picked from commit 0476e8f1ac)
2019-09-27 09:16:02 +02:00
Ondřej Surý 9d400c7d89 Fix the wrong function for the atomic_fetch_add_explicit64 shim on non-WIN64 build 2019-09-26 13:01:26 +02:00
Mark Andrews 31a905775c reinstate error handler
(cherry picked from commit 7fb0a0db53)
2019-09-13 14:29:54 +10:00
Mark Andrews 946f08db99 declare alloc_failure
(cherry picked from commit 0d23bc5b55)
2019-09-13 14:26:36 +10:00
Mark Andrews fd395947ad declare result
(cherry picked from commit 9ee27573af)
2019-09-13 14:26:36 +10:00
Mark Andrews 57824120e4 address or suppress cppcheck warnings
(cherry picked from commit b59fe46e76)
2019-09-12 19:27:28 +10:00
Mark Andrews d72f73af48 implement maxudp under windows
(cherry picked from commit 2f558854b7)
2019-09-04 10:50:00 +10:00
Ondřej Surý 4e04e3d861 Convert isc_hash functions to use isc_siphash24
(cherry picked from commit 2e7d82443f)
2019-07-21 15:32:57 -04:00
Ondřej Surý 8d87ad53eb Add reference SipHash 2-4 implementation
(cherry picked from commit a197df137a)
2019-07-21 15:32:56 -04:00
Evan Hunt b5032f7a8b add support for building GeoIP2 on windows 2019-07-04 12:05:32 -07:00
Evan HuntandOndřej Surý a78af2f1d3 refactor tcpquota and pipeline refs; allow special-case overrun in isc_quota
- if the TCP quota has been exceeded but there are no clients listening
  for new connections on the interface, we can now force attachment to the
  quota using isc_quota_force(), instead of carrying on with the quota not
  attached.
- the TCP client quota is now referenced via a reference-counted
  'ns_tcpconn' object, one of which is created whenever a client begins
  listening for new connections, and attached to by members of that
  client's pipeline group. when the last reference to the tcpconn
  object is detached, it is freed and the TCP quota slot is released.
- reduce code duplication by adding mark_tcp_active() function
- convert counters to stdatomic

(cherry picked from commit a8dd133d270873b736c1be9bf50ebaa074f5b38f)
(cherry picked from commit 4a8fc979c4)
2019-04-25 16:20:50 +02:00
Mark AndrewsandEvan Hunt cdf928d391 Handle EDQUOT and ENOSPC errors
(cherry picked from commit 435ae2f29a)
2019-03-07 21:23:39 -08:00
Evan HuntandMark Andrews 2f13524164 initalize a named_g_defaultbindkeys variable 2019-02-06 13:18:00 +11:00
Witold KręcickiandOndřej Surý 9ded5d5193 Cast atomic_load_explicit to proper size 2019-01-30 14:12:06 +01:00
Ondřej Surý f2d1a88efc Add #pragma intrinsic for intrinsic Windows functions 2019-01-30 13:48:58 +01:00
Ondřej Surý 9539e1c3a1 Fix memory_order_cst_seq -> memory_order_seq_cst typo 2019-01-30 13:48:58 +01:00
Ondřej Surý 4f5e83b139 Add define for InterlockedExchangeAdd8 intrinsic 2019-01-30 13:48:58 +01:00
Ondřej Surý 7a7a8b0f7b Add atomic_bool implementation to unix and win32 stdatomic.h shim headers 2019-01-30 09:37:38 +01:00
Ondřej Surý a84e70acd0 Fix copy&paste error in the atomic_fetch_add_explicit{32,64} macros.
- InterlockedExchange was incorrectly used in place where InterlockedExchangeAdd
  should have been used
2019-01-30 09:37:38 +01:00
Evan HuntandOndřej Surý 19dd6a409c Fix a typo in the win32 version of the atomic_store macro 2019-01-30 09:37:38 +01: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
Ondřej Surý e2cdf066ea Remove message catalogs 2019-01-09 23:44:26 +01:00
Ondřej Surý 272c065268 Add emacs .dir-locals.el settings for flycheck mode 2018-12-19 17:03:37 +01:00
Ondřej Surý e24afa3088 Fix typo __LINE -> __LINE__ 2018-11-24 00:53:24 +01: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ýandWitold Kręcicki 2f3eee5a4f isc_mutex_init returns 'void' 2018-11-22 11:51:49 +00:00
Ondřej SurýandWitold Kręcicki 73a8999d1c isc_condition_init returns 'void' 2018-11-22 11:51:49 +00:00
Mark Andrews 474fbe88bf add missing tasks argument 2018-11-16 11:51:05 +11:00
Evan HuntandWitold Kręcicki 1f0cd6606e style: one-line statement braces, line length, etc 2018-11-15 08:21:40 +00:00
Witold Kręcicki ca7b5ceee5 Synchronize Windows socket code with API changes. 2018-11-15 08:21:17 +00:00
Witold Kręcicki 9c926a5d9b Mangle fdlocks a bit.
Mutexes are slower if they're in the same cache line. Since
fd's come in herds, and usually our listen sockets will have nearby
fd numbers, we mangle fdlocks so that the locks are further away.
2018-11-15 08:21:17 +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 Kręcicki 778ab8158a Remove fdwatch sockets, those are not used anywhere. 2018-11-15 08:21:17 +00:00
Ondřej Surý 6f5fe11f5a isc_stdtime_t is always 32-bit now, so remove the always true macro STDTIME_ON_32BITS 2018-11-09 02:27:06 +07:00
Ondřej Surý 23fff6c569 Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +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
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 Krecicki 7b6721b27f isc_thread_setaffinity() 2018-11-06 08:19:50 +00:00
Witold KręcickiandMichał Kępień 76ec6861e5 Remove vector socket functions from Windows socket code
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
Ondřej Surý 68b49d87b2 Add md.h and md.c to Windows build files 2018-10-25 20:59:48 +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 3f35ab8567 remove references to methods and app_api.c 2018-10-19 00:28:53 -07:00
Evan Hunt c609a67ac7 change to bool constants; also fixed style error 2018-10-18 20:42:25 -07:00