From c7bac27a53842903ec2c9e101b0fdb06ead35ce7 Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 6 Jan 2021 23:06:47 +0100 Subject: [PATCH] nxdomain if no rr found --- coolDns.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coolDns.go b/coolDns.go index 6b1ff0b..9914591 100644 --- a/coolDns.go +++ b/coolDns.go @@ -360,6 +360,10 @@ func handleRequest(w dns.ResponseWriter, r *dns.Msg, zone zoneView) { } } + if len(m.Answer) == 0 { + m.SetRcode(m, dns.RcodeNameError) + } + w.WriteMsg(m) }