Skip to content

Instantly share code, notes, and snippets.

Created Oct 13, 2015
What would you like to do?
Small module that appends SOA for NS queries.
local mod = {}
mod.layer = {
consume = function (state, req, answer)
if state == kres.FAIL then
return state
answer = kres.pkt_t(answer)
req = kres.request_t(req)
if answer:qtype() == kres.type.NS then
local qry = req:push(answer:qname(), kres.type.SOA, kres.class.IN)
qry.flags = kres.query.AWAIT_CUT
return state
return mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment