]> granicus.if.org Git - pdns/commitdiff
dnsdist: Add a Lua binding for `DynBlockRulesGroup:setQuiet(quiet)`
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 29 Aug 2019 14:26:50 +0000 (16:26 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 29 Aug 2019 14:26:50 +0000 (16:26 +0200)
pdns/dnsdist-lua-inspection.cc
pdns/dnsdistdist/docs/reference/config.rst

index 2de56ff1c9c4b2315ed3bdb66433049a1096d127..bcae7276a7d3f822317ed98ea988617cd7464604 100644 (file)
@@ -745,5 +745,6 @@ void setupLuaInspection()
   g_lua.registerFunction<void(std::shared_ptr<DynBlockRulesGroup>::*)()>("apply", [](std::shared_ptr<DynBlockRulesGroup>& group) {
     group->apply();
   });
+  g_lua.registerFunction("setQuiet", &DynBlockRulesGroup::setQuiet);
   g_lua.registerFunction("toString", &DynBlockRulesGroup::toString);
 }
index b2752c653ea89431d1a05c50d03decd22500fa8c..a505f6894b267b543fae5fa4f2eb2345cdbfc270 100644 (file)
@@ -1043,6 +1043,14 @@ faster than the existing rules.
 
     Walk the in-memory query and response ring buffers and apply the configured rate-limiting rules, adding dynamic blocks when the limits have been exceeded.
 
+  .. method:: DynBlockRulesGroup:setQuiet(quiet)
+
+    .. versionadded:: 1.4.0
+
+    Set whether newly blocked clients or domains should be logged.
+
+    :param bool quiet: True means that insertions will not be logged, false that they will. Default is false.
+
   .. method:: DynBlockRulesGroup:excludeRange(netmasks)
 
     .. versionadded:: 1.3.1