max iterations for neg cache.

git-svn-id: file:///svn/unbound/trunk@1291 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2008-10-09 13:06:06 +00:00
parent c73c662fce
commit bfb4e20f43
4 changed files with 18 additions and 9 deletions
+8 -7
View File
@@ -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;
}