]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Use nsec3s_seen flag for speedup.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 13 Sep 2007 15:11:25 +0000 (15:11 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 13 Sep 2007 15:11:25 +0000 (15:11 +0000)
git-svn-id: file:///svn/unbound/trunk@612 be551aaa-1e26-0410-a405-d3ace91eadb9

validator/validator.c

index a334b491b1eaa6cbc3a33d2a84b0807bca4189ec..00354177de1e5b883dfd5ba9b2d1b475c9a913a7 100644 (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,