2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00
Commit Graph

7702 Commits

Author SHA1 Message Date
Ondřej Surý
a2e38f758d Add lib/dns/tests/testdata/dnstap/dnstap.file to .gitignore 2018-12-11 11:32:24 +01:00
Ondřej Surý
e69dc0dbc7 Remove RSAMD5 support 2018-12-11 11:32:24 +01:00
Mark Andrews
b108376a10 log a error if we don't explicitly know that a error has been logged in zone_sign 2018-12-10 14:57:11 +11:00
Tinderbox User
5bd855251c prep 9.13.5 2018-12-07 03:41:19 +00:00
Mark Andrews
9eec02a81f Properly detect bottom of zone when sign_a_node() is not called 2018-12-07 11:20:16 +11:00
Evan Hunt
fd20f10d52 name change from "hook modules" to "plugins"
- "hook" is now used only for hook points and hook actions
- the "hook" statement in named.conf is now "plugin"
- ns_module and ns_modlist are now ns_plugin and ns_plugins
- ns_module_load is renamed ns_plugin_register
- the mandatory functions in plugin modules (hook_register,
  hook_check, hook_version, hook_destroy) have been renamed
2018-12-06 10:36:50 -08:00
Evan Hunt
b94945e606 refactor to support multiple module instances
- use a per-view module list instead of global hook_modules
- create an 'instance' pointer when registering modules, store it in
  the module structure, and use it as action_data when calling
  hook functions - this enables multiple module instances to be set
  up in parallel
- also some nomenclature changes and cleanup
2018-12-06 10:29:12 -08:00
Evan Hunt
427e9ca357 clear AD flag when altering response messages
- the AD flag was not being cleared correctly when filtering
- enabled dnssec valdiation in the filter-aaaa test to confirm this
  works correctly now
2018-12-06 10:29:11 -08:00
Evan Hunt
81f58e2ea2 enable modules to store data in qctx
- added a 'hookdata' array to qctx to store pointers to up to
  16 blobs of data which are allocated by modules as needed.
  each module is assigned an ID number as it's loaded, and this
  is the index into the hook data array. this is to be used for
  holding persistent state between calls to a hook module for a
  specific query.
- instead of using qctx->filter_aaaa, we now use qctx->hookdata.
  (this was the last piece of filter-aaaa specific code outside the
  module.)
- added hook points for qctx initialization and destruction. we get
  a filter-aaaa data pointer from the mempool when initializing and
  store it in the qctx->hookdata table; return to to the mempool
  when destroying the qctx.
- link the view to the qctx so that detaching the client doesn't cause
  hooks to fail
- added a qctx_destroy() function which must be called after qctx_init;
  this calls the QCTX_DESTROY hook and detaches the view
- general cleanup and comments
2018-12-06 10:29:11 -08:00
Evan Hunt
9911c835d3 add a parser to filter-aaaa.so and pass in the parameters
- make some cfg-parsing functions global so they can be run
  from filter-aaaa.so
- add filter-aaaa options to the hook module's parser
- mark filter-aaaa options in named.conf as obsolete, remove
  from named and checkconf, and update the filter-aaaa test not to
  use checkconf anymore
- remove filter-aaaa-related struct members from dns_view
2018-12-06 10:29:11 -08:00
Evan Hunt
d2f4644388 add hook statement to configuration parser
- allow multiple "hook" statements at global or view level
- add "optional bracketed text" type for optional parameter list
- load hook module from specified path rather than hardcoded path
- add a hooktable pointer (and a callback for freeing it) to the
  view structure
- change the hooktable functions so they no longer update ns__hook_table
  by default, and modify PROCESS_HOOK so it uses the view hooktable, if
  set, rather than ns__hook_table. (ns__hook_table is retained for
  use by unit tests.)
- update the filter-aaaa system test to load filter-aaaa.so
- add a prereq script to check for dlopen support before running
  the filter-aaaa system test

not yet done:
- configuration parameters are not being passed to the filter-aaaa
  module; the filter-aaaa ACL and filter-aaaa-on-{v4,v6} settings are
  still stored in dns_view
2018-12-06 10:29:11 -08:00
Evan Hunt
d43dcef139 refactor filter-aaaa implementation
- the goal of this change is for AAAA filtering to be fully contained
   in the query logic, and implemented at discrete points that can be
   replaced with hook callouts later on.
 - the new code may be slightly less efficient than the old filter-aaaa
   implementation, but maximum efficiency was never a priority for AAAA
   filtering anyway.
 - we now use the rdataset RENDERED attribute to indicate that an AAAA
   rdataset should not be included when rendering the message. (this
   flag was originally meant to indicate that an rdataset has already
   been rendered and should not be repeated, but it can also be used to
   prevent rendering in the first place.)
 - the DNS_MESSAGERENDER_FILTER_AAAA, NS_CLIENTATTR_FILTER_AAAA,
   and DNS_RDATASETGLUE_FILTERAAAA flags are all now unnecessary and
   have been removed.
2018-12-06 10:29:10 -08:00
Evan Hunt
70cc3f803e set up hooks.c to enable setting hook points and loading modules
- move hooks.h to public include directory
- ns_hooktable_init() initializes a hook table. if NULL is passed in, it
  initializes the global hook table
- ns_hooktable_save() saves a pointer to the current global hook table.
- ns_hooktable_reset() replaces the global hook table with different
  one
- ns_hook_add() adds hooks at specified hook points in a hook table (or
  the global hook table if the specified table is NULL)
- load and unload functions support dlopen() of hook modules (this is
  adapted from dyndb and not yet functional)
- began adding new hook points to query.c
2018-12-06 10:29:05 -08:00
Ondřej Surý
ef87b1e60b Don't check the memory leaks in the libdns tests as they hide the cmocka assertion failures 2018-12-04 09:00:42 +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
Evan Hunt
b99af25d0f silence compiler warning 2018-11-28 12:00:16 -05:00
Mark Andrews
0708e43d3f update zname with the current zone anme 2018-11-28 15:59:30 +11:00
Ondřej Surý
a688a43faf Move the CMocka include directories from CFLAGS to CINCLUDES where it belongs to not get overriden later by the default CFLAGS rule 2018-11-26 16:16:34 +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
Mark Andrews
2156a5b610 address coverity side effect in assert warning 2018-11-22 17:57:54 -05:00
Ondřej Surý
2271e77d99 Add couple more ISC_UNREACHABLE(); found thanks to coccinelle 2018-11-22 09:28:00 -05: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ý
2f3eee5a4f isc_mutex_init returns 'void' 2018-11-22 11:51:49 +00:00
Tinderbox User
db1cd0d970 prep 9.13.4 2018-11-22 00:20:22 +00:00
Ondřej Surý
6b65a4f86e Fix typo ISC_SHA256_DIGESTLENGHT -> ISC_SHA256_DIGESTLENGTH 2018-11-21 23:34:44 +01:00
Ondřej Surý
175f06949f Use strlcpy in place where strncpy(s, ...) + s[sizeof(s)-1] = \0; was used 2018-11-19 07:58:48 +01:00
Evan Hunt
8f15219f36 remove (or hide behind a 'verbose' flag) extra output from system tests 2018-11-16 20:46:14 +00:00
Evan Hunt
1f0cd6606e style: one-line statement braces, line length, etc 2018-11-15 08:21:40 +00:00
Witold Kręcicki
559ce1e330 use REUSEPORT only for NOLISTEN dispatchers 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
Evan Hunt
8c4d50c6bc remove ATF source code and Atffiles 2018-11-14 20:17:04 -08:00
Joey
336d5a5374 convert update_test; remove ATF from lib/dns/tests 2018-11-14 20:17:04 -08:00
Joey
92a3762cb6 convert tsig_test 2018-11-14 20:17:04 -08:00
Joey
2c7e6947fa convert time_test 2018-11-14 20:17:04 -08:00
Joey
eda6281f98 convert sigs_test 2018-11-14 20:17:04 -08:00
Joey
b915cdbf0b convert rsa_test 2018-11-14 20:17:04 -08:00
Joey
2837a821e8 convert resolver_test 2018-11-14 20:17:04 -08:00
Joey
dfd90dbb82 convert rbt_serialize_test 2018-11-14 20:17:04 -08:00
Joey
1b48e710d5 convert name_test 2018-11-14 20:17:04 -08:00
Joey
4ba08bb119 convert master_test 2018-11-14 20:17:04 -08:00
Joey
e38901154d convert keytable_test 2018-11-14 20:17:04 -08:00
Joey
9a464ef869 convert private_test 2018-11-14 20:17:04 -08:00
Evan Hunt
98d5abb73c convert dbversion_test 2018-11-14 20:17:04 -08:00
Joey
ad923f82b1 convert dst_test 2018-11-14 20:17:04 -08:00
Joey
005e19ad3f convert db_test 2018-11-14 20:17:04 -08:00
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