mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-27 20:24:55 +02:00
max iterations for neg cache.
git-svn-id: file:///svn/unbound/trunk@1291 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -121,13 +121,6 @@ val_apply_cfg(struct module_env* env, struct val_env* val_env,
|
||||
log_err("validator: error in trustanchors config");
|
||||
return 0;
|
||||
}
|
||||
if(!val_env->neg_cache)
|
||||
val_env->neg_cache = val_neg_create(cfg);
|
||||
if(!val_env->neg_cache) {
|
||||
log_err("out of memory");
|
||||
return 0;
|
||||
}
|
||||
env->neg_cache = val_env->neg_cache;
|
||||
val_env->date_override = cfg->val_date_override;
|
||||
c = cfg_count_numbers(cfg->val_nsec3_key_iterations);
|
||||
if(c < 1 || (c&1)) {
|
||||
@@ -140,6 +133,14 @@ val_apply_cfg(struct module_env* env, struct val_env* val_env,
|
||||
log_err("validator: cannot apply nsec3 key iterations");
|
||||
return 0;
|
||||
}
|
||||
if(!val_env->neg_cache)
|
||||
val_env->neg_cache = val_neg_create(cfg,
|
||||
val_env->nsec3_maxiter[val_env->nsec3_keyiter_count-1]);
|
||||
if(!val_env->neg_cache) {
|
||||
log_err("out of memory");
|
||||
return 0;
|
||||
}
|
||||
env->neg_cache = val_env->neg_cache;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user