From: Frank Louwers <24672+franklouwers@users.noreply.github.com> Date: Wed, 13 Mar 2019 08:30:32 +0000 (+0100) Subject: Fix error in setQueryRate warning example X-Git-Tag: auth-4.2.0-rc1~5^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F7570%2Fhead;p=thirdparty%2Fpdns.git Fix error in setQueryRate warning example The correct syntax for setQueryRate is: ``` :setQueryRate(rate, seconds, reason, blockingTime[, action[, warningRate]]) ``` The guide forgot to include the "action" parameter in the warningRate example. Note that because the actions are integers, this was valid LUA. It even worked, but the rule wouldn't show up in showDynBlocks() --- diff --git a/pdns/dnsdistdist/docs/guides/dynblocks.rst b/pdns/dnsdistdist/docs/guides/dynblocks.rst index fd718430e0..bcbe7fb2de 100644 --- a/pdns/dnsdistdist/docs/guides/dynblocks.rst +++ b/pdns/dnsdistdist/docs/guides/dynblocks.rst @@ -82,5 +82,5 @@ action is applied. local dbr = dynBlockRulesGroup() -- generate a warning above 100 qps for 10s, and start dropping incoming queries above 300 qps for 10s - dbr:setQueryRate(300, 10, "Exceeded query rate", 60, 100) + dbr:setQueryRate(300, 10, "Exceeded query rate", 60, DNSAction.Drop, 100)