Add logging for DNS error returns from upstream and local configuration.

This commit is contained in:
Simon Kelley committed 2018-05-04 21:52:22 +01:00
1 parent 0669ee7a69
commit 07ed585c38
4 files changed
+52 -12

No files matched your search

+13
View File
@@ -1598,6 +1598,19 @@ void log_query(unsigned int flags, char *name, struct all_addr *addr, char *arg)
{
if (flags & F_KEYTAG)
sprintf(daemon->addrbuff, arg, addr->addr.log.keytag, addr->addr.log.algo, addr->addr.log.digest);
else if (flags & F_RCODE)
{
unsigned int rcode = addr->addr.rcode.rcode;
if (rcode == SERVFAIL)
dest = "SERVFAIL";
else if (rcode == REFUSED)
dest = "REFUSED";
else if (rcode == NOTIMP)
dest = "not implemented";
else
sprintf(daemon->addrbuff, "%u", rcode);
}
else
{
#ifdef HAVE_IPV6