Return NXDOMAIN if no records are returned
This commit is contained in:
parent
2c93312d74
commit
d74fcd0a47
1
main.go
1
main.go
@ -69,6 +69,7 @@ func query(tp string, name string, m *dns.Msg, coll *mongo.Collection) {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if appendResults(tp, name, m, cur) == 0 {
|
if appendResults(tp, name, m, cur) == 0 {
|
||||||
|
m.Rcode = dns.RcodeNameError
|
||||||
counterNoResults.Inc()
|
counterNoResults.Inc()
|
||||||
} else {
|
} else {
|
||||||
counterAlternativeNames.Inc()
|
counterAlternativeNames.Inc()
|
||||||
|
Reference in New Issue
Block a user