diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-12-18 09:16:42 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-12-18 09:16:42 +0000 |
commit | 4e22f0417a02f7f87741bfdd1331a5453f759d06 (patch) | |
tree | 0337d9a41aa405cb6b1b00aec6e7f3ae75e7d59d | |
parent | afd5620d11a4982900d09216089f24c58147d3a4 (diff) |
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]); |