Only send response if we have one
This commit is contained in:
1 parent
721038cbef
commit
f17c684cc9
1 file changed
+1
-1
+1
-1
@@ -19,10 +19,10 @@ func handleLocal(w dns.ResponseWriter, r *dns.Msg) {
|
||||
Class: dns.ClassINET, Ttl: 3600}
|
||||
a := &dns.A{hdr, net.ParseIP(ip)}
|
||||
m.Answer = append(m.Answer, a)
|
||||
w.WriteMsg(m)
|
||||
} else {
|
||||
log.Printf("Failed lookup for %s", q.Name)
|
||||
}
|
||||
w.WriteMsg(m)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user