]> granicus.if.org Git - pdns/commitdiff
also show dynblock number of blocks in showDynBlocks()
authorbert hubert <bert.hubert@netherlabs.nl>
Sat, 5 Dec 2015 21:25:49 +0000 (22:25 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Sat, 5 Dec 2015 21:25:49 +0000 (22:25 +0100)
pdns/dnsdist-lua2.cc

index 389b41ad181d4d01e1252c5d5c55d045956f433d..87db0854d8d352f0778da6b529213cd6c8cb63e7 100644 (file)
@@ -125,11 +125,11 @@ void moreLua()
       auto slow = g_dynblockNMG.getCopy();
       struct timespec now;
       clock_gettime(CLOCK_MONOTONIC, &now);
-      boost::format fmt("%-24s %8d %s\n");
-      g_outputBuffer = (fmt % "Netmask" % "Seconds" % "Reason").str();
+      boost::format fmt("%-24s %8d %8d %s\n");
+      g_outputBuffer = (fmt % "Netmask" % "Seconds" % "Blocks" % "Reason").str();
       for(const auto& e: slow) {
        if(now < e->second.until)
-         g_outputBuffer+= (fmt % e->first.toString() % (e->second.until.tv_sec - now.tv_sec) % e->second.reason).str();
+         g_outputBuffer+= (fmt % e->first.toString() % (e->second.until.tv_sec - now.tv_sec) % e->second.blocks % e->second.reason).str();
       }
     });