]> granicus.if.org Git - pdns/commitdiff
do not skip TCP TC logging when not throttling
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 22 May 2019 14:11:33 +0000 (16:11 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Wed, 22 May 2019 14:11:33 +0000 (16:11 +0200)
pdns/syncres.cc

index 5dd3c98a39fefc6d2d0baecf51328714b50a1d25..1109293964d8f48ababf50181262aec36622fa22 100644 (file)
@@ -2977,10 +2977,12 @@ bool SyncRes::doResolveAtThisIP(const std::string& prefix, const DNSName& qname,
   if(lwr.d_tcbit) {
     *truncated = true;
 
-    if (doTCP && !dontThrottle) {
+    if (doTCP) {
       LOG(prefix<<qname<<": truncated bit set, over TCP?"<<endl);
-      /* let's treat that as a ServFail answer from this server */
-      t_sstorage.throttle.throttle(d_now.tv_sec, boost::make_tuple(remoteIP, qname, qtype.getCode()), 60, 3);
+      if (!dontThrottle) {
+        /* let's treat that as a ServFail answer from this server */
+        t_sstorage.throttle.throttle(d_now.tv_sec, boost::make_tuple(remoteIP, qname, qtype.getCode()), 60, 3);
+      }
       return false;
     }