]> granicus.if.org Git - pdns/commitdiff
add PoolAction() to Lua
authorbert hubert <bert.hubert@netherlabs.nl>
Sun, 13 Dec 2015 10:21:38 +0000 (11:21 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Sun, 13 Dec 2015 10:21:38 +0000 (11:21 +0100)
pdns/dnsdist-lua.cc

index b5e0a2691e944d94f02c1a55a11784147480f279..5e78e8132364511e3b35417cd7ee3a97844948fc 100644 (file)
@@ -407,6 +407,10 @@ vector<std::function<void(void)>> setupLua(bool client, const std::string& confi
       return std::shared_ptr<DNSAction>(new NoRecurseAction);
     });
 
+  g_lua.writeFunction("PoolAction", [](const string& a) {
+      return std::shared_ptr<DNSAction>(new PoolAction(a));
+    });
+
   g_lua.writeFunction("SpoofAction", [](const string& a, boost::optional<string> b) {
       if(b) 
        return std::shared_ptr<DNSAction>(new SpoofAction(ComboAddress(a), ComboAddress(*b)));