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

7207 Commits

Author SHA1 Message Date
Evan Hunt
8d347788b0 convert dispatch_test 2018-11-14 20:17:04 -08:00
Evan Hunt
01a193ff6c convert zonemgr_test 2018-11-14 20:17:04 -08:00
Evan Hunt
0a4f6122de convert zt_test 2018-11-14 20:17:04 -08:00
Evan Hunt
bb5ed5a4ac convert rdata_test
- also added code to dnstest.c to optionally suppress printing of errors
  from dns_rdata_fromtxt()
2018-11-14 20:17:04 -08:00
Evan Hunt
55465517c7 convert rbt_test 2018-11-14 20:17:04 -08:00
Evan Hunt
9f83d31e42 convert dnstap_test 2018-11-14 20:17:04 -08:00
Evan Hunt
06b4ff5fe2 convert geoip_test 2018-11-14 20:17:04 -08:00
Evan Hunt
015fda0bb4 convert nsec3_test 2018-11-14 20:17:04 -08:00
Evan Hunt
28121c248e convert rdatasetstats_test 2018-11-14 20:17:04 -08:00
Evan Hunt
79cd093cd7 convert dbiterator_test 2018-11-14 20:17:04 -08:00
Evan Hunt
6dfc868fba convert dbdiff_test 2018-11-14 20:17:04 -08:00
Evan Hunt
db5eece106 convert peer_test 2018-11-14 20:17:04 -08:00
Evan Hunt
cca16eccd7 convert rdataset_test 2018-11-14 20:17:04 -08:00
Evan Hunt
a33bca5d55 convert acl_test 2018-11-14 20:17:04 -08:00
Evan Hunt
dcf65c82ad convert dh_test 2018-11-14 20:17:04 -08:00
Evan Hunt
318b340f5e convert query_test
- also fixed a bug in openssldh_link.c that turned up in the process
2018-11-14 20:17:04 -08:00
Evan Hunt
d8766293ab assert if {isc,dns,ns}_test_begin() is called when a prior test is running 2018-11-14 20:17:04 -08:00
Evan Hunt
b434b0a4b6 remove .NOTPARALLEL so unit tests can build faster 2018-11-14 20:17:04 -08:00
Evan Hunt
2afd18a2ce add cmocka support to remaining unit test makefiles
- also cleaned up some existing test code
2018-11-14 20:17:04 -08:00
Ondřej Surý
c38b145b89 Remove OPENSSL_cleanup() call as we cannot recover from that, it will be called via atexit mechanism automatically 2018-11-14 20:17:04 -08:00
Mark Andrews
4eadebe2b2 uninitalize memory read on error path 2018-11-14 15:26:27 -05:00
Mark Andrews
93776c4c81 errors initalizing badcaches were not caught or cleaned up on error paths 2018-11-14 15:26:27 -05:00
Witold Kręcicki
9c8fead6d8 qname minimization: issue a warning only if the server is really broken 2018-11-14 19:55:10 +00:00
Mark Andrews
50714a9b35 free tmpzonename and restart_master 2018-11-14 11:23:21 -08:00
Mark Andrews
333f718dd3 don't use 'typename' as it is reserved in C++ 2018-11-14 13:45:20 -05:00
Ondřej Surý
e9a939841d Add min-cache-ttl and min-ncache-ttl keywords
Sometimes it is useful to set a 'floor' on the TTL for records
to be cached.  Some sites like to use ridiculously low TTLs for
some reason, and that often is not compatible with slow links.

Signed-off-by: Michael Milligan <milli@acmeps.com>
Signed-off-by: LaMont Jones <lamont@debian.org>
2018-11-14 18:24:53 +01:00
Evan Hunt
471110933a convert result tests to use CMocka instead of ATF 2018-11-10 12:29:40 -08:00
Mark Andrews
4f04a79250 check result tables are complete 2018-11-10 10:30:43 +11: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ý
b992b5b811 Modify the dbversion_test.c to detect disabled assertions 2018-11-08 12:22:17 +07:00
Ondřej Surý
29c45200e7 Add extra return failure after INSIST(0) in default branch 2018-11-08 12:22:17 +07:00
Ondřej Surý
4eaf927571 Use larger buffers on snprintf buffer overflow false positives 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
9a903789ed Use larger quantum for network tasks 2018-11-06 08:19:50 +00:00
Tony Finch
1b1d63acd8 Fixes for rndc nta user interface
Tell the user explicitly about their mistakes:

* Unknown options, e.g. -list instead of -dump
  or -delete instead of -remove.

* Unknown view names.

* Excess arguments.

Include the view name in `rndc nta -dump` output, for consistency with
the NTA add and remove actions.

When removing an NTA from all views, do not abort with an error if the
NTA was not found in one of the views.
2018-11-05 22:01:28 -08:00
Tony Finch
3064d3d0ef Abolish ip6.int support in dig and mdig 2018-11-05 19:07:31 -05:00
Mark Andrews
99b25eb379 two dns_name_dup calls were not checked 2018-11-05 14:46:08 -08:00
Witold Kręcicki
2d0a33208c Cleanup fctx->finds before sending 'final' query after qname minimization.
At the beginning of qname minimization we get fctx->finds filled with what's
in the cache at this point, in worst case root servers. After doing full
run querying for NSes at different levels we need to clean it and refill
it with proper values from cache.
2018-11-05 09:57:11 +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
Ondřej Surý
c1d111cd2e Destroy task first when destroying catzs.
When freeing catzs structures we need to kill the updater task first.
    Otherwise we might race with the updater and there might be a crash
    on shutdown.
2018-10-30 14:01:01 +01:00
Witold Kręcicki
541872bf3b Destroy task first when destroying rpzs.
When freeing rpzs structures we need to kill the updater task first.
Otherwise we might race with the updater and there might be a crash
on shutdown.
2018-10-30 14:01:01 +01:00
Mark Andrews
cf83016682 compare_nxt compared records with identical next fields case insensitively 2018-10-30 14:51:39 +11:00
Mark Andrews
2ff57d8a39 Record types which support a empty rdata field were not handling the empty rdata field case. 2018-10-30 11:03:02 +11:00
Witold Kręcicki
8283cbabdc <stdlib.h> include in rpz.c for strtoul 2018-10-29 23:04:01 +01:00
Michał Kępień
139bc2c6ab Release all resources when shutting down an RPZ zone during an update
If an RPZ zone is to be freed during an update, canceling the
update_quantum() event is not enough because the resources released when
an update completes also need to be accounted for.  Failure to do this
results in a hang upon shutdown.  Fix by copying cleanup code from the
end of update_quantum() to rpz_detach().
2018-10-29 23:04:00 +01:00
Witold Kręcicki
faf2c7711a Fix a race in RPZ with min-update-interval set to 0
If another RPZ update is pending when processing the previous one nears
completion and min-update-interval is set to 0, isc_timer_reset() gets
called with 'interval' set to 0, which triggers an assertion failure.
To prevent such a scenario from causing a crash, queue the update event
directly instead of asking the timer thread to do it.
2018-10-29 23:04:00 +01:00
Witold Kręcicki
37df3ca8b6 Style nits 2018-10-29 19:22:10 +00:00
Witold Kręcicki
08460c8cb2 Don't do qname minimization when forwarding; Avoid some intermittent errors in qmin tests caused by timing 2018-10-29 19:22:10 +00:00