]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix error in setQueryRate warning example 7570/head
authorFrank Louwers <24672+franklouwers@users.noreply.github.com>
Wed, 13 Mar 2019 08:30:32 +0000 (09:30 +0100)
committerGitHub <noreply@github.com>
Wed, 13 Mar 2019 08:30:32 +0000 (09:30 +0100)
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()

pdns/dnsdistdist/docs/guides/dynblocks.rst

index fd718430e0a200a784c2b032b292458528e2a063..bcbe7fb2de341f6032d90a579eba84b252c49598 100644 (file)
@@ -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)