diff options
author | 2019-12-18 09:16:41 +0000 | |
---|---|---|
committer | 2019-12-18 09:16:41 +0000 | |
commit | d346393d15a3a59e85feffec0141c721cd5225c1 (patch) | |
tree | 5d13c53be100c508a932204a76080bc9214c081a | |
parent | Allow pagefault_disable() to be called recursively, something that may happen (diff) | |
download | wireguard-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.c | 4 |
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]); |