summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2019-12-18 09:16:41 +0000
committerflorian <florian@openbsd.org>2019-12-18 09:16:41 +0000
commitd346393d15a3a59e85feffec0141c721cd5225c1 (patch)
tree5d13c53be100c508a932204a76080bc9214c081a
parentAllow pagefault_disable() to be called recursively, something that may happen (diff)
downloadwireguard-openbsd-d346393d15a3a59e85feffec0141c721cd5225c1.tar.xz
wireguard-openbsd-d346393d15a3a59e85feffec0141c721cd5225c1.zip
Use neg and key cache from the passed in environment if initialized so that
unwind can share caches between strategies. testing by otto & pamela as part of a larger diff
-rw-r--r--sbin/unwind/libunbound/validator/validator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/unwind/libunbound/validator/validator.c b/sbin/unwind/libunbound/validator/validator.c
index fa8d5419a80..c341d017e98 100644
--- a/sbin/unwind/libunbound/validator/validator.c
+++ b/sbin/unwind/libunbound/validator/validator.c
@@ -121,6 +121,8 @@ val_apply_cfg(struct module_env* env, struct val_env* val_env,
log_err("out of memory");
return 0;
}
+ if (env->key_cache)
+ val_env->kcache = env->key_cache;
if(!val_env->kcache)
val_env->kcache = key_cache_create(cfg);
if(!val_env->kcache) {
@@ -146,6 +148,8 @@ val_apply_cfg(struct module_env* env, struct val_env* val_env,
log_err("validator: cannot apply nsec3 key iterations");
return 0;
}
+ if (env->neg_cache)
+ val_env->neg_cache = env->neg_cache;
if(!val_env->neg_cache)
val_env->neg_cache = val_neg_create(cfg,
val_env->nsec3_maxiter[val_env->nsec3_keyiter_count-1]);