]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Always validate on 'validate' and 'log-fail' 3710/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 15 Apr 2016 09:55:40 +0000 (11:55 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 15 Apr 2016 09:58:11 +0000 (11:58 +0200)
Closes #3709

Also add a comment in the code regarding another DNSSEC ticket

pdns/pdns_recursor.cc

index 86fc88598de0c333b86a0632ce6c560850ec08ce..3cee6bde2053f20ef4472f498d677f13954f3660 100644 (file)
@@ -925,7 +925,9 @@ void startDoResolve(void *p)
     else {
       pw.getHeader()->rcode=res;
 
-      if(haveEDNS) {
+      // FIXME: haveEDNS is not the way to handle initiation of validation, we
+      // should look for the AD bit in the header, see #3682
+      if(haveEDNS || g_dnssecmode == DNSSECMode::ValidateAll || g_dnssecmode==DNSSECMode::ValidateForLog) {
        if(g_dnssecmode != DNSSECMode::Off && ((edo.d_Z & EDNSOpts::DNSSECOK) || g_dnssecmode == DNSSECMode::ValidateAll || g_dnssecmode==DNSSECMode::ValidateForLog)) {
           if(sr.doLog()) {
             L<<Logger::Warning<<"Starting validation of answer to "<<dc->d_mdp.d_qname<<" for "<<dc->d_remote.toStringWithPort()<<endl;