From: tcely Date: Fri, 25 May 2018 02:46:31 +0000 (-0400) Subject: fallback to old type key so test2 data will work X-Git-Tag: dnsdist-1.4.0-rc3~42^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df1f9438afde7e2ebaa3802c1b4d6cb65a4e59e4;p=thirdparty%2Fpdns.git fallback to old type key so test2 data will work --- diff --git a/modules/luabackend/private.cc b/modules/luabackend/private.cc index 919834e4b7..07079a4767 100644 --- a/modules/luabackend/private.cc +++ b/modules/luabackend/private.cc @@ -163,6 +163,9 @@ bool LUABackend::dnsrr_from_table(lua_State *lua, DNSResourceRecord &rr) { lua_pop(lua, 1); if (getValueFromTable(lua, "qtype", qt_name)) rr.qtype = qt_name; + else // fallback to old key for tests to pass + if (getValueFromTable(lua, "type", qt_name)) + rr.qtype = qt_name; } getValueFromTable(lua, "qclass", rr.qclass);