diff --git a/nselib/dns.lua b/nselib/dns.lua index 412f4c455..e5fa3f236 100644 --- a/nselib/dns.lua +++ b/nselib/dns.lua @@ -67,7 +67,13 @@ end local function gotAnswer(rPkt) -- have we even got answers? if #rPkt.answers > 0 then - + + -- some MDNS implementation incorrectly return an empty question section + -- if this is the case return true + if rPkt.questions[1] == nil then + return true + end + -- are those answers not just cnames? if rPkt.questions[1].dtype == types.A then for _, v in ipairs(rPkt.answers) do