]> granicus.if.org Git - pdns/commitdiff
Dynamic blocks were being created with the wrong duration (the detection interval...
authorDavid Freedman <david.freedman@uk.clara.net>
Mon, 4 Jun 2018 11:59:37 +0000 (12:59 +0100)
committerDavid Freedman <david.freedman@uk.clara.net>
Mon, 4 Jun 2018 13:02:28 +0000 (14:02 +0100)
pdns/dnsdist-dynblocks.hh

index 2df9ebbb590f5cb120472347edfa4bca7fd4b993..5b896e81ce08fa284faab70a6be187d3d04e6e24 100644 (file)
@@ -203,7 +203,7 @@ private:
       blocks = g_dynblockNMG.getCopy();
     }
     struct timespec until = now;
-    until.tv_sec += rule.d_seconds;
+    until.tv_sec += rule.d_blockDuration;
     unsigned int count = 0;
     const auto& got = blocks->lookup(Netmask(requestor));
     bool expired = false;
@@ -225,7 +225,7 @@ private:
     DynBlock db{rule.d_blockReason, until, DNSName(), rule.d_action};
     db.blocks = count;
     if (!got || expired) {
-      warnlog("Inserting dynamic block for %s for %d seconds: %s", requestor.toString(), rule.d_seconds, rule.d_blockReason);
+      warnlog("Inserting dynamic block for %s for %d seconds: %s", requestor.toString(), rule.d_blockDuration, rule.d_blockReason);
     }
     blocks->insert(Netmask(requestor)).second = db;
     updated = true;