]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
expose SMN toString to lua 4301/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 8 Aug 2016 19:11:06 +0000 (21:11 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Thu, 11 Aug 2016 08:41:22 +0000 (10:41 +0200)
docs/markdown/recursor/scripting.md
pdns/lua-recursor4.cc

index ac3291ad85414f8e9f548418acc30d2812e79d59..b551c8f93ca9ed89a5869733dcc8f93b19692963 100644 (file)
@@ -264,6 +264,8 @@ be `true` if dq.qname is part of any of the Suffix Match group domains.
 
 This could e.g. be used to answer questions for known malware domains.
 
+To see the set of suffixes matched by a Suffix Match Group, use `:toString()`.
+
 ### Metrics
 You can custom metrics which will be shown in the output of 'rec_control get-all'
 and sent to the metrics server over the Carbon protocol, and also appear in the
index 0db7ef432fc14bf2c14a896864fd5164268ff6aa..10aad19a32b3cd34a88f1b32d77c60dd8c443df3 100644 (file)
@@ -387,6 +387,7 @@ RecursorLua4::RecursorLua4(const std::string& fname)
                                                                                     catch(std::exception& e) { theL() <<Logger::Error<<e.what()<<endl; }
                                                                                   });
   d_lw->registerFunction("check",(bool (SuffixMatchNode::*)(const DNSName&) const) &SuffixMatchNode::check);
+  d_lw->registerFunction("toString",(string (SuffixMatchNode::*)() const) &SuffixMatchNode::toString);
 
 
   d_lw->writeFunction("pdnslog", [](const std::string& msg, boost::optional<int> loglevel) {