From: Petr Špaček Date: Mon, 1 Jul 2019 16:00:53 +0000 (+0200) Subject: sandbox: fix missing default class in resolve() function X-Git-Tag: v4.1.0~10^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a330b9aceba15def18c4b853a7c1e80c9c0b168;p=thirdparty%2Fknot-resolver.git sandbox: fix missing default class in resolve() function Regression in 19ef77d1e (unreleased): Default value IN for qclass parameter was missing. Also consistently use A as default for qtype. --- diff --git a/daemon/lua/sandbox.lua.in b/daemon/lua/sandbox.lua.in index 8ebfbb80f..cc867ef9b 100644 --- a/daemon/lua/sandbox.lua.in +++ b/daemon/lua/sandbox.lua.in @@ -60,12 +60,14 @@ worker.resolve = function (qname, qtype, qclass, options, finish, init) if type(qname) == 'table' then local t = qname qname = t.name - qtype = t.type or kres.type.A - qclass = t.class or kres.class.IN + qtype = t.type + qclass = t.class options = t.options finish = t.finish init = t.init end + qtype = qtype or kres.type.A + qclass = qclass or kres.class.IN options = kres.mk_qflags(options) -- LATER: nicer errors for rubbish in qname, qtype, qclass? local pkt = ffi.C.worker_resolve_mk_pkt(qname, qtype, qclass, options)