Improvements
------------
- dns64 module: also map the reverse (PTR) subtree (#478, !1201)
+- dns64 module: allow disabling based on client address (#368, !1201)
Knot Resolver 5.4.1 (2021-08-19)
bool NO_NS_FOUND : 1; /**< No valid NS found during last PRODUCE stage. */
bool PKT_IS_SANE : 1; /**< Set by iterator in consume phase to indicate whether
* some basic aspects of the packet are OK, e.g. QNAME. */
+ bool DNS64_DISABLE : 1; /**< Don't do any DNS64 stuff (meant for view:addr). */
};
/** Combine flags together. This means set union for simple flags. */
if state == kres.FAIL then return state end
local qry = req:current()
-- Observe only final answers in IN class where request has no CD flag.
- if M.proxy == nil or not qry.flags.RESOLVED
+ if M.proxy == nil or not qry.flags.RESOLVED or qry.flags.DNS64_DISABLE
or pkt:qclass() ~= kres.class.IN or req.qsource.packet:cd() then
return state
end
function M.layer.produce(_, req, pkt)
local qry = req.current_query
local sname = qry.sname
- if ffi.C.knot_dname_in_bailiwick(sname, M.rev_suffix) < 0
+ if ffi.C.knot_dname_in_bailiwick(sname, M.rev_suffix) < 0 or qry.flags.DNS64_DISABLE
then return end
-- Update packet question if it was minimized.
qry.flags.NO_MINIMIZE = true