From: Remi Gacogne Date: Thu, 29 Aug 2019 14:26:50 +0000 (+0200) Subject: dnsdist: Add a Lua binding for `DynBlockRulesGroup:setQuiet(quiet)` X-Git-Tag: dnsdist-1.4.0-rc2~4^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8252%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Add a Lua binding for `DynBlockRulesGroup:setQuiet(quiet)` --- diff --git a/pdns/dnsdist-lua-inspection.cc b/pdns/dnsdist-lua-inspection.cc index 2de56ff1c9..bcae7276a7 100644 --- a/pdns/dnsdist-lua-inspection.cc +++ b/pdns/dnsdist-lua-inspection.cc @@ -745,5 +745,6 @@ void setupLuaInspection() g_lua.registerFunction::*)()>("apply", [](std::shared_ptr& group) { group->apply(); }); + g_lua.registerFunction("setQuiet", &DynBlockRulesGroup::setQuiet); g_lua.registerFunction("toString", &DynBlockRulesGroup::toString); } diff --git a/pdns/dnsdistdist/docs/reference/config.rst b/pdns/dnsdistdist/docs/reference/config.rst index b2752c653e..a505f6894b 100644 --- a/pdns/dnsdistdist/docs/reference/config.rst +++ b/pdns/dnsdistdist/docs/reference/config.rst @@ -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