]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
typo; update version; actually include the Lua binding
authorph1 <ph1@slurpee2.phoned.ca>
Tue, 12 Oct 2021 15:29:23 +0000 (09:29 -0600)
committerph1 <ph1@slurpee2.phoned.ca>
Tue, 12 Oct 2021 15:29:23 +0000 (09:29 -0600)
pdns/dnsdist-console.cc
pdns/dnsdist-lua-rules.cc
pdns/dnsdistdist/docs/rules-actions.rst

index e20018dc098c54592fb4ee84994bebe35a293905..c9eb185bb90916632a2f34462fba632139782778 100644 (file)
@@ -541,7 +541,7 @@ const std::vector<ConsoleKeyword> g_consoleKeywords{
   { "OrRule", true, "selectors", "Matches the traffic if one or more of the the selectors rules does match" },
   { "PoolAction", true, "poolname", "set the packet into the specified pool" },
   { "PoolAvailableRule", true, "poolname", "Check whether a pool has any servers available to handle queries" },
-  { "PoolOutstandingRule", true, "poolname, limit", "Check weather a pool has outstanding queries above limit" },
+  { "PoolOutstandingRule", true, "poolname, limit", "Check whether a pool has outstanding queries above limit" },
   { "printDNSCryptProviderFingerprint", true, "\"/path/to/providerPublic.key\"", "display the fingerprint of the provided resolver public key" },
   { "ProbaRule", true, "probability", "Matches queries with a given probability. 1.0 means always" },
   { "ProxyProtocolValueRule", true, "type [, value]", "matches queries with a specified Proxy Protocol TLV value of that type, optionally matching the content of the option as well" },
index 12e44a042c88e1344340e649ce959370d0e59c21..19eec4ca66229a01c5946ed83bee72ee7ba09371 100644 (file)
@@ -568,6 +568,10 @@ void setupLuaRules(LuaContext& luaCtx)
     return std::shared_ptr<DNSRule>(new PoolAvailableRule(poolname));
   });
 
+  luaCtx.writeFunction("PoolOutstandingRule", [](std::string poolname, size_t limit) {
+    return std::shared_ptr<DNSRule>(new PoolOutstandingRule(poolname, limit));
+  });
+
   luaCtx.registerFunction<void(std::shared_ptr<TimedIPSetRule>::*)()>("clear", [](std::shared_ptr<TimedIPSetRule> tisr) {
       tisr->clear();
     });
index e408e56ee4a989a074ac3c09ac8f61c88695ef50..b585c8df4cc185ac206a3b75b07032449e090cdd 100644 (file)
@@ -763,6 +763,8 @@ These ``DNSRule``\ s be one of the following items:
 
 .. function:: PoolOutstandingRule(poolname, limit)
 
+  .. versionadded:: 1.7.0
+
   Check whether a pool has total outstanding queries above limit
 
   .. code-block:: Lua