Merge pull request #1137 from 42wim/fix-1124

Recurse when PTR answer is empty
This commit is contained in:
Armon Dadgar 2015-07-29 14:39:04 -07:00
commit 0363d4b54b

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 // Write out the complete response
if err := resp.WriteMsg(m); err != nil { if err := resp.WriteMsg(m); err != nil {
d.logger.Printf("[WARN] dns: failed to respond: %v", err) d.logger.Printf("[WARN] dns: failed to respond: %v", err)