Skip to content
Snippets Groups Projects
Commit 88a4575a authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

Merge !1055: workarounds: remove *.in-addr.arpa.net NO_0X20 workarrounds

parents 0c8d0bd4 967976a6
Branches
Tags
1 merge request!1055workarounds: remove *.in-addr.arpa.net NO_0X20 workarrounds
Pipeline #68538 passed with stage
in 1 minute and 36 seconds
......@@ -19,36 +19,5 @@ function M.config()
}))
end
-- Issue #139: When asking certain nameservers for PTR, disable 0x20.
-- Just listing the *.in-addr.arpa suffixes would be tedious, as there are many.
M.layer = {
produce = function (state, req)
local qry = req:current()
if qry.stype ~= kres.type.PTR
or bit.band(state, bit.bor(kres.FAIL, kres.DONE)) ~= 0
then return state -- quick exit in most cases
end
if qry.flags.AWAIT_CUT or qry.ns.name == nil
then return state end
local name = kres.dname2str(qry.ns.name)
if not name then return state end
-- The problematic nameservers:
-- (1) rdnsN.turktelekom.com.tr.
if string.sub(name, 6) == '.turktelekom.com.tr.' then
qry.flags.NO_0X20 = true
qry.flags.NO_MINIMIZE = true
-- ^ NO_MINIMIZE isn't required for success, as kresd will retry
-- after getting refused, but it will speed things up.
-- (2)
elseif name == 'dns1.edatel.net.co.' then
qry.flags.NO_0X20 = true
end
return state
end,
}
return M
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment