0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

ircd::net::dns: Don't log.error common NXDOMAIN rcodes.

This commit is contained in:
Jason Volk 2018-02-07 12:15:01 -08:00
parent 45e9f7304f
commit 09b0c3d20d

View file

@ -2555,7 +2555,7 @@ try
"Response header is marked as 'Query' and not 'Response'" "Response header is marked as 'Query' and not 'Response'"
}; };
if(unlikely(header.rcode)) if(header.rcode)
throw rfc1035::error throw rfc1035::error
{ {
"protocol error: %s", rfc1035::rcode.at(header.rcode) "protocol error: %s", rfc1035::rcode.at(header.rcode)
@ -2632,10 +2632,13 @@ try
} }
catch(const std::exception &e) catch(const std::exception &e)
{ {
log.error("resolver tag:%u [%s]: %s", // There's no need to flash red to the log for NXDOMAIN which is
tag.id, // common in this system when probing SRV.
string(tag.hp), if(unlikely(header.rcode != 3))
e.what()); log.error("resolver tag:%u [%s]: %s",
tag.id,
string(tag.hp),
e.what());
if(tag.cb) if(tag.cb)
tag.cb(std::current_exception(), {}); tag.cb(std::current_exception(), {});