+13 August 2020: Ralph
+ - Create and init edns tags data for libunbound.
+
10 August 2020: Ralph
- Merge (modified) PR #277, use EVP_MAC_CTX_set_params if available,
by Vítězslav Čížek.
#include "services/authzone.h"
#include "util/data/msgreply.h"
#include "util/storage/slabhash.h"
+#include "util/edns.h"
#include "sldns/sbuffer.h"
int
return UB_INITFAIL;
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz))
return UB_INITFAIL;
+ if(!edns_tags_apply_cfg(ctx->env->edns_tags, cfg))
+ return UB_INITFAIL;
if(!slabhash_is_size(ctx->env->msg_cache, cfg->msg_cache_size,
cfg->msg_cache_slabs)) {
slabhash_delete(ctx->env->msg_cache);
#include "util/net_help.h"
#include "util/tube.h"
#include "util/ub_event.h"
+#include "util/edns.h"
#include "services/modstack.h"
#include "services/localzone.h"
#include "services/cache/infra.h"
errno = ENOMEM;
return NULL;
}
+ ctx->env->edns_tags = edns_tags_create();
+ if(!ctx->env->edns_tags) {
+ auth_zones_delete(ctx->env->auth_zones);
+ edns_known_options_delete(ctx->env);
+ config_delete(ctx->env->cfg);
+ free(ctx->env);
+ ub_randfree(ctx->seed_rnd);
+ free(ctx);
+ errno = ENOMEM;
+ return NULL;
+ }
+
ctx->env->alloc = &ctx->superalloc;
ctx->env->worker = NULL;
ctx->env->need_to_validate = 0;