}
};
+class NoneAction : public DNSAction
+{
+public:
+ DNSAction::Action operator()(DNSQuestion* dq, string* ruleresult) const override
+ {
+ return Action::None;
+ }
+ string toString() const override
+ {
+ return "no op";
+ }
+};
class QPSAction : public DNSAction
{
return std::shared_ptr<DNSAction>(new AllowAction);
});
+ g_lua.writeFunction("NoneAction", []() {
+ return std::shared_ptr<DNSAction>(new NoneAction);
+ });
+
g_lua.writeFunction("DelayAction", [](int msec) {
return std::shared_ptr<DNSAction>(new DelayAction(msec));
});
class TestAdvancedAllow(DNSDistTest):
_config_template = """
+ addAction(AllRule(), NoneAction())
addAction(makeRule("allowed.advanced.tests.powerdns.com."), AllowAction())
addAction(AllRule(), DropAction())
newServer{address="127.0.0.1:%s"}