]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fallback to old type key so test2 data will work
authortcely <tcely@users.noreply.github.com>
Fri, 25 May 2018 02:46:31 +0000 (22:46 -0400)
committertcely <tcely@users.noreply.github.com>
Fri, 25 May 2018 02:46:31 +0000 (22:46 -0400)
modules/luabackend/private.cc

index 919834e4b7a10551d25d6976ca925a99c7834c89..07079a4767ae54a4ce977123648368c1c28f05fc 100644 (file)
@@ -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);