Return NOTIMP for some unimplemented query types, NXDOMAIN otherwise

This commit is contained in:
Alvaro Saurin committed 2015-05-05 21:31:11 +02:00
1 parent 56038674b1
commit ba98135e03
5 files changed
+18 -11

No files matched your search

+1 -1
View File
@@ -277,7 +277,7 @@ func (s *DNSServer) commonQueryHandler(proto dnsProtocol, kind string, qtype uin
// catch unsupported queries
if q.Qtype != qtype {
Debug.Printf("[dns msgid %d] Unsupported query type %s", r.MsgHdr.Id, dns.TypeToString[q.Qtype])
m := makeDNSNotImplResponse(r)
m := makeDNSFailResponse(r)
s.cache.Put(r, m, negLocalTTL, 0)
w.WriteMsg(m)
return