From 71851d8c38e6d811c99a6ba81801e57f5a778b41 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 2 May 2016 10:29:27 +0200 Subject: [PATCH] rec: Add missing Lua rcodes bindings Closes #3717. --- pdns/lua-recursor4.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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}, -- 2.47.2