summaryrefslogtreecommitdiff
path: root/modules/m_dns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/m_dns.cpp')
-rw-r--r--modules/m_dns.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/m_dns.cpp b/modules/m_dns.cpp
index 93f09246e..4dc6d7bfa 100644
--- a/modules/m_dns.cpp
+++ b/modules/m_dns.cpp
@@ -854,6 +854,9 @@ class MyManager : public Manager, public Timer
}
}
+ if (packet->answers.empty() && packet->authorities.empty() && packet->additional.empty() && packet->error == ERROR_NONE)
+ packet->error = ERROR_REFUSED; // usually safe, won't cause an NXDOMAIN to get cached
+
s->Reply(packet);
return true;
}