Recurse when PTR answer is empty

This commit is contained in:
Wim 2015-07-27 23:22:36 +02:00
parent a6317f2fb2
commit 5647a37ffe

View File

@ -209,6 +209,12 @@ func (d *DNSServer) handlePtr(resp dns.ResponseWriter, req *dns.Msg) {
}
}
// nothing found locally, recurse
if len(m.Answer) == 0 {
d.handleRecurse(resp, req)
return
}
// Write out the complete response
if err := resp.WriteMsg(m); err != nil {
d.logger.Printf("[WARN] dns: failed to respond: %v", err)