]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix auth logging if no packet cache; from Habbie
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 28 Oct 2019 11:21:49 +0000 (12:21 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 28 Oct 2019 11:21:49 +0000 (12:21 +0100)
pdns/common_startup.cc
pdns/tcpreceiver.cc

index bce6b27ef67bb758dfa8ef609cb303d83b46639c..102feed64b385647661818591bfd31234eaee106 100644 (file)
@@ -465,14 +465,19 @@ try
     }
 
     if(distributor->isOverloaded()) {
-      if(logDNSQueries) 
+      if(logDNSQueries)
         g_log<<"Dropped query, backends are overloaded"<<endl;
       overloadDrops++;
       continue;
     }
-        
-    if(PC.enabled() && logDNSQueries)
-      g_log<<"packetcache MISS"<<endl;
+
+    if (logDNSQueries) {
+      if (PC.enabled()) {
+        g_log<<"packetcache MISS"<<endl;
+      } else {
+        g_log<<"packetcache SKIP"<<endl;
+      }
+    }
 
     try {
       distributor->question(question, &sendout); // otherwise, give to the distributor
index 5634318dedbd15c436f24d7dd83d7c4a66fc2a28..350e4abfa3e03ad9929efd39e6d64df93dbd7930 100644 (file)
@@ -373,6 +373,10 @@ void *TCPNameserver::doConnection(void *data)
         }
         if(logDNSQueries)
             g_log<<"packetcache MISS"<<endl;
+      } else {
+        if (logDNSQueries) {
+          g_log<<"packetcache SKIP"<<endl;
+        }
       }
       {
         Lock l(&s_plock);