Commit Graph
11925 Commits
Author SHA1 Message Date
Evan HuntandOndřej Surý a1871e7f1d further cleanup
- removed some dead code
- dns_zone_setdbtype is now void as it could no longer return
  anything but ISC_R_SUCCESS; calls to it no longer check for a result
- controlkeylist_fromconfig() is also now void
- fixed a whitespace error
2019-07-23 15:32:36 -04:00
Ondřej Surý 19eb5d0e83 Cleanup the failure handling in isc_mem_allocate 2019-07-23 15:32:36 -04:00
Ondřej Surý 9123da5362 Adjust tkey_test.c test to mock_assert() when there's no memory 2019-07-23 15:32:36 -04:00
Ondřej Surý f0c6aef542 Cleanup stray goto labels from removing isc_mem_allocate/strdup checking blocks 2019-07-23 15:32:36 -04:00
Ondřej Surý 9bdc24a9fd Use coccinelle to cleanup the failure handling blocks from isc_mem_strdup 2019-07-23 15:32:36 -04:00
Ondřej Surý 601cb4e4cc Use coccinelle to cleanup the failure handling blocks from isc_mem_allocate 2019-07-23 15:32:35 -04:00
Ondřej Surý ae83801e2b Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
Ondřej Surý b558346437 Fix the lib/dns/tests/Makefile.in to work without LD_WRAP 2019-07-23 08:59:36 -04:00
Michał Kępień ca528766d6 Restore locking in resume_dslookup()
Commit 9da902a201 removed locking around
the fctx_decreference() call inside resume_dslookup().  This allows
fctx_unlink() to be called without the bucket lock being held, which
must never happen.  Ensure the bucket lock is held by resume_dslookup()
before it calls fctx_decreference().
2019-07-23 11:43:46 +02:00
Evan HuntandOndřej Surý 839ed7894b Make the symbol wrapping work with dynamic linking
When the unit test is linked with dynamic libraries, the wrapping
doesn't occur, probably because it's different translation unit.

To workaround the issue, we provide thin wrappers with *real* symbol
names that just call the mocked functions.
2019-07-22 17:16:51 -04:00
Ondřej Surý 135519e59a Fix the configure.ac and Makefile.in to correctly test for --wrap 2019-07-22 23:00:37 +02:00
Mark Andrews a4f38bec6a named-checkconf failed to report dnstap-output missing
from named.conf when dnstap was specified
2019-07-23 05:09:01 +10:00
Mark Andrews 1eb640049c Do not attempt to perform a DNS64 rewrite if RPZ returns NODATA. 2019-07-23 04:19:28 +10:00
Ondřej Surý a4141fcf98 Restore more locking in the lib/dns/resolver.c code
1. Restore locking in the fctx_decreference() code, because the insides of the
   function needs to be protected when fctx->references drops to 0.

2. Restore locking in the dns_resolver_attach() code, because two variables are
   accessed at the same time and there's slight chance of data race.
2019-07-22 09:03:27 -04:00
Ondřej Surý 317e36d47e Restore locking in dns_resolver_shutdown and dns_resolver_attach
Although the struct dns_resolver.exiting member is protected by stdatomics, we
actually need to wait for whole dns_resolver_shutdown() to finish before
destroying the resolver object.  Otherwise, there would be a data race and some
fctx objects might not be destroyed yet at the time we tear down the
dns_resolver object.
2019-07-22 08:17:36 -04:00
Ondřej Surý 779aa2c9d9 Add siphash_test to lib/isc/tests/Kyuafile 2019-07-22 08:06:14 -04:00
Ondřej Surý 926f2dedbd Add endian.h to libisc.vcxproj.* files 2019-07-22 08:06:14 -04:00
Ondřej Surý 69e84ab9c1 Fixup the increment vs decrement typo in lib/isc/win32/socket.c 2019-07-21 22:05:24 -04:00
Ondřej Surý a912f31398 Add new default siphash24 cookie algorithm, but keep AES as legacy
This commit changes the BIND cookie algorithms to match
draft-sury-toorop-dnsop-server-cookies-00.  Namely, it changes the Client Cookie
algorithm to use SipHash 2-4, adds the new Server Cookie algorithm using SipHash
2-4, and changes the default for the Server Cookie algorithm to be siphash24.

Add siphash24 cookie algorithm, and make it keep legacy aes as
2019-07-21 15:16:28 -04:00
Witold KręcickiandOndřej Surý afa81ee4e4 Remove all cookie algorithms but AES, which was used as a default, for legacy purposes. 2019-07-21 10:08:14 -04:00
Ondřej Surý d1c7b79183 Fix the memory leaks in GeoIP unit test
Each individual test opened GeoIP databased but the database handles were never
closed.  This commit moves the open/close from the individual unit tests into
the _setup and _teardown methods where they really belong.
2019-07-16 15:35:34 +02:00
Ondřej Surý 5b5930dca1 Remove #include <config.h> usage from siphash.c and siphash_test.c 2019-07-12 15:28:58 +02:00
Ondřej Surý dc234e3819 Replace the only memcpy usage with memmove 2019-07-12 15:28:00 +02:00
Tinderbox User 2e637325ed prep 9.15.2 2019-07-10 14:59:47 +00:00
Witold Kręcicki 895eabd376 Fix Windows compilation issues with !1952, contributed by Thomas Jach 2019-07-10 12:31:39 +02:00
Witold Kręcicki e56cc07f50 Fix a few broken atomics initializations 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 81faafd508 lib/ns/stats.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 0471d1c1ce lib/isc/win32/socket.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki c0511688b5 lib/isc/task.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki f1471bc2e1 lib/isc/stats.c: Use ->references instead of ->refs 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki cbe8034dc8 lib/isc/quota.c: use proper acquire/release/relaxed memory order semantics 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 244ac0601f lib/isc/counter.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 81550c67da lib/dns/zt.c: use isc_refcount_t and atomics 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 3c30d095c4 lib/dns/tsig.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 2a57d0b00c lib/dns/ssu.c: use isc_refcount_t 2019-07-09 16:11:14 +02:00
Ondřej SurýandWitold Kręcicki 38a973a33f lib/dns/sdlz.c:
- use isc_refcount_t
- properly detach from nodes so that we don't destroy objects
  that have non-zero references count
2019-07-09 16:10:53 +02:00
Ondřej SurýandWitold Kręcicki f3577e4635 lib/dns/sdb.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 9da902a201 lib/dns/resolver.c: use isc_refcount_t and atomics 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 6622c7a70a lib/dns/masterdump.c: use isc_refcount_t and atomics 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 1097a209e1 lib/dns/master.c: use isc_refcount_t and atomics 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 8a128151f9 lib/dns/lib.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki 3dece71b91 lib/dns/nta.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki f5d3250d90 lib/dns/ecdb.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Ondřej SurýandWitold Kręcicki d108e86cc8 lib/dns/dbtable.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Witold Kręcicki 757cff6644 lib/dns/cache.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Witold Kręcicki 44e2088449 dns/stats.c: use isc_refcount_t 2019-07-09 16:09:36 +02:00
Witold Kręcicki de73904d03 lib/ns/client: use refcount_t for reference counting 2019-07-09 16:09:36 +02:00
Witold Kręcicki fc19182e97 lib/ns/lib.c: use isc_refcount_t for reference counting 2019-07-09 16:09:36 +02:00
Witold Kręcicki 92424e23fa Special, for-tests-only, mode with atomics emulated by a mutex-locked variable - useful for finding atomics congestions 2019-07-09 16:09:36 +02:00
Witold Kręcicki 5aeb99786e Properly initialize all atomic variables 2019-07-09 16:09:36 +02:00