From: bert hubert Date: Thu, 8 Sep 2016 03:40:38 +0000 (+0200) Subject: fix up lua-auth for new DNSZoneRecord world X-Git-Tag: dnsdist-1.1.0-beta2~123^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e683fad98c013c5cfaaffbd077d4788a30f5387;p=thirdparty%2Fpdns.git fix up lua-auth for new DNSZoneRecord world --- diff --git a/pdns/lua-auth4.cc b/pdns/lua-auth4.cc index 87bfad6f4f..a6ff335f99 100644 --- a/pdns/lua-auth4.cc +++ b/pdns/lua-auth4.cc @@ -192,11 +192,14 @@ AuthLua4::AuthLua4(const std::string& fname) { d_lw->writeVariable("pdns", pd); d_lw->writeFunction("resolve", [](const std::string& qname, uint16_t qtype) { - std::vector ret; + std::vector ret; std::unordered_map luaResult; - stubDoResolve(qname, qtype, ret); + stubDoResolve(DNSName(qname), qtype, ret); int i = 0; - for(const auto &row: ret) luaResult[++i] = row; + for(const auto &row: ret) { + luaResult[++i] = DNSResourceRecord(row.dr); + luaResult[i].auth = row.auth; + } return luaResult; });