Use nsec3s_seen flag for speedup.

git-svn-id: file:///svn/unbound/trunk@612 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-09-13 15:11:25 +00:00
parent 92198b3624
commit b22e1d4273

View file

@ -642,7 +642,7 @@ validate_nameerror_response(struct module_env* env, struct val_env* ve,
nsec3s_seen = 1;
}
if(!has_valid_nsec || !has_valid_wnsec) {
if((!has_valid_nsec || !has_valid_wnsec) && nsec3s_seen) {
/* use NSEC3 proof, both answer and auth rrsets, in case
* NSEC3s end up in the answer (due to qtype=NSEC3 or so) */
chase_reply->security = nsec3_prove_nameerror(env, ve,