diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/dnstap/dnstap.c | 4 | ||||
-rw-r--r-- | modules/edns_keepalive/edns_keepalive.c | 3 | ||||
-rw-r--r-- | modules/hints/hints.c | 10 | ||||
-rw-r--r-- | modules/nsid/nsid.c | 3 | ||||
-rw-r--r-- | modules/ta_update/ta_update.test.integr/kresd_config.j2 | 1 | ||||
-rw-r--r-- | modules/ta_update/ta_update.unmanagedkey.test.integr/kresd_config.j2 | 1 |
6 files changed, 9 insertions, 13 deletions
diff --git a/modules/dnstap/dnstap.c b/modules/dnstap/dnstap.c index 75726672..ab52bca3 100644 --- a/modules/dnstap/dnstap.c +++ b/modules/dnstap/dnstap.c @@ -10,7 +10,7 @@ #include "modules/dnstap/dnstap.pb-c.h" #include "contrib/cleanup.h" -#include "daemon/session.h" +#include "daemon/session2.h" #include "daemon/worker.h" #include "lib/layer.h" #include "lib/resolve.h" @@ -116,7 +116,7 @@ static int get_tcp_info(const struct kr_request *req, struct tcp_info *info) if (!req->qsource.dst_addr || !req->qsource.flags.tcp) /* not TCP-based */ return -abs(ENOENT); /* First obtain the file-descriptor. */ - uv_handle_t *h = session_get_handle(worker_request_get_source_session(req)); + uv_handle_t *h = session2_get_handle(worker_request_get_source_session(req)); uv_os_fd_t fd; int ret = uv_fileno(h, &fd); if (ret) diff --git a/modules/edns_keepalive/edns_keepalive.c b/modules/edns_keepalive/edns_keepalive.c index 30d5df32..22b1397f 100644 --- a/modules/edns_keepalive/edns_keepalive.c +++ b/modules/edns_keepalive/edns_keepalive.c @@ -29,8 +29,7 @@ static int edns_keepalive_finalize(kr_layer_t *ctx) if (!ka_want) { return ctx->state; } - const struct network *net = &the_worker->engine->net; - uint64_t timeout = net->tcp.in_idle_timeout / 100; + uint64_t timeout = the_network->tcp.in_idle_timeout / 100; if (timeout > UINT16_MAX) { timeout = UINT16_MAX; } diff --git a/modules/hints/hints.c b/modules/hints/hints.c index 1f8e6876..ccbc9880 100644 --- a/modules/hints/hints.c +++ b/modules/hints/hints.c @@ -409,9 +409,7 @@ static void unpack_hint(struct kr_zonecut *root_hints, JsonNode *table, const ch */ static char* hint_root(void *env, struct kr_module *module, const char *args) { - struct engine *engine = env; - struct kr_context *ctx = &engine->resolver; - struct kr_zonecut *root_hints = &ctx->root_hints; + struct kr_zonecut *root_hints = &the_resolver->root_hints; /* Replace root hints if parameter is set */ if (args && args[0] != '\0') { JsonNode *root_node = json_decode(args); @@ -425,11 +423,9 @@ static char* hint_root(void *env, struct kr_module *module, const char *args) static char* hint_root_file(void *env, struct kr_module *module, const char *args) { - struct engine *engine = env; - struct kr_context *ctx = &engine->resolver; - const char *err_msg = engine_hint_root_file(ctx, args); + const char *err_msg = engine_hint_root_file(args); if (err_msg) { - luaL_error(engine->L, "error when opening '%s': %s", args, err_msg); + luaL_error(the_engine->L, "error when opening '%s': %s", args, err_msg); } return strdup(err_msg ? err_msg : ""); } diff --git a/modules/nsid/nsid.c b/modules/nsid/nsid.c index a67dcdb5..a106d17d 100644 --- a/modules/nsid/nsid.c +++ b/modules/nsid/nsid.c @@ -59,13 +59,12 @@ static int nsid_finalize(kr_layer_t *ctx) { static char* nsid_name(void *env, struct kr_module *module, const char *args) { - struct engine *engine = env; struct nsid_config *config = module->data; if (args) { /* set */ /* API is not binary safe, we need to fix this one day */ uint8_t *arg_copy = (uint8_t *)strdup(args); if (arg_copy == NULL) - luaL_error(engine->L, "[nsid] error while allocating new NSID value\n"); + luaL_error(the_engine->L, "[nsid] error while allocating new NSID value\n"); free(config->local_nsid); config->local_nsid = arg_copy; config->local_nsid_len = strlen(args); diff --git a/modules/ta_update/ta_update.test.integr/kresd_config.j2 b/modules/ta_update/ta_update.test.integr/kresd_config.j2 index da319a28..f19c5b7d 100644 --- a/modules/ta_update/ta_update.test.integr/kresd_config.j2 +++ b/modules/ta_update/ta_update.test.integr/kresd_config.j2 @@ -23,6 +23,7 @@ end policy.add(policy.suffix(policy.PASS, {todname('test.')})) cache.size = 2*MB log_level('debug') +net.bufsize(4096) {% endraw %} modules.load('hints') diff --git a/modules/ta_update/ta_update.unmanagedkey.test.integr/kresd_config.j2 b/modules/ta_update/ta_update.unmanagedkey.test.integr/kresd_config.j2 index 263404d7..300dac95 100644 --- a/modules/ta_update/ta_update.unmanagedkey.test.integr/kresd_config.j2 +++ b/modules/ta_update/ta_update.unmanagedkey.test.integr/kresd_config.j2 @@ -39,6 +39,7 @@ end policy.add(policy.suffix(policy.PASS, {todname('test.')})) cache.size = 2*MB log_level('debug') +net.bufsize(4096) {% endraw %} modules.load('hints') |