From: Remi Gacogne Date: Mon, 2 May 2016 08:29:27 +0000 (+0200) Subject: rec: Add missing Lua rcodes bindings X-Git-Tag: rec-4.0.0-alpha3~22^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3801%2Fhead;p=thirdparty%2Fpdns.git rec: Add missing Lua rcodes bindings Closes #3717. --- diff --git a/pdns/lua-recursor4.cc b/pdns/lua-recursor4.cc index 76ab32149a..4c04553bc3 100644 --- a/pdns/lua-recursor4.cc +++ b/pdns/lua-recursor4.cc @@ -371,6 +371,20 @@ RecursorLua4::RecursorLua4(const std::string& fname) {"TRUNCATE", (int)PolicyDecision::TRUNCATE} }; + vector > rcodes = {{"NOERROR", RCode::NoError }, + {"FORMERR", RCode::FormErr }, + {"SERVFAIL", RCode::ServFail }, + {"NXDOMAIN", RCode::NXDomain }, + {"NOTIMP", RCode::NotImp }, + {"REFUSED", RCode::Refused }, + {"YXDOMAIN", RCode::YXDomain }, + {"YXRRSET", RCode::YXRRSet }, + {"NXRRSET", RCode::NXRRSet }, + {"NOTAUTH", RCode::NotAuth }, + {"NOTZONE", RCode::NotZone }}; + for(const auto& rcode : rcodes) + pd.push_back({rcode.first, rcode.second}); + pd.push_back({"loglevels", in_t{ {"Alert", LOG_ALERT}, {"Critical", LOG_CRIT},