Commit 2b786105 authored by Evan Hunt's avatar Evan Hunt
Browse files

[master] reduce EDNS logging noise

3831.	[cleanup]	Reduce logging noise when EDNS state changes occur.
			[RT #35843]
parent 0dc0b029
3831. [cleanup] Reduce logging noise when EDNS state changes occur.
[RT #35843]
3830. [func] When query logging is enabled, log query errors at
the same level ('info') as the queries themselves.
[RT #35844]
......
......@@ -7330,18 +7330,18 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
message->rcode == dns_rcode_refused ||
message->rcode == dns_rcode_yxdomain) &&
bad_edns(fctx, &query->addrinfo->sockaddr)) {
/*
* XXXMPA We need to drop/remove the logging here when we have more
* experience.
*/
char buf[4096], addrbuf[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_format(&query->addrinfo->sockaddr, addrbuf,
sizeof(addrbuf));
snprintf(buf, sizeof(buf), "received packet from %s "
"(bad edns):\n", addrbuf);
dns_message_logpacket(message, buf,
DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
ISC_LOG_NOTICE, fctx->res->mctx);
if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
char buf[4096], addrbuf[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_format(&query->addrinfo->sockaddr,
addrbuf, sizeof(addrbuf));
snprintf(buf, sizeof(buf),
"received packet from %s (bad edns):\n",
addrbuf);
dns_message_logpacket(message, buf,
DNS_LOGCATEGORY_RESOLVER,
DNS_LOGMODULE_RESOLVER,
ISC_LOG_DEBUG(3), fctx->res->mctx);
}
dns_adb_changeflags(fctx->adb, query->addrinfo,
DNS_FETCHOPT_NOEDNS0,
DNS_FETCHOPT_NOEDNS0);
......@@ -7349,29 +7349,29 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
(message->rcode == dns_rcode_noerror ||
message->rcode == dns_rcode_nxdomain) &&
(query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
/*
* Old versions of named incorrectly drop the OPT record
* when there is a signed, truncated response so check that
* TC is not set.
*/
/*
* XXXMPA We need to drop/remove the logging here when we have more
* experience.
*/
char buf[4096], addrbuf[ISC_SOCKADDR_FORMATSIZE];
/*
* We didn't get a OPT record in response to a EDNS query.
*
* Old versions of named incorrectly drop the OPT record
* when there is a signed, truncated response so we check
* that TC is not set.
*
* Record that the server is not talking EDNS. While this
* should be safe to do for any rcode we limit it to NOERROR
* and NXDOMAIN.
*/
isc_sockaddr_format(&query->addrinfo->sockaddr, addrbuf,
sizeof(addrbuf));
snprintf(buf, sizeof(buf), "received packet from %s (no opt):\n",
addrbuf);
dns_message_logpacket(message, buf,
DNS_LOGCATEGORY_RESOLVER, DNS_LOGMODULE_RESOLVER,
ISC_LOG_NOTICE, fctx->res->mctx);
if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
char buf[4096], addrbuf[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_format(&query->addrinfo->sockaddr,
addrbuf, sizeof(addrbuf));
snprintf(buf, sizeof(buf),
"received packet from %s (no opt):\n",
addrbuf);
dns_message_logpacket(message, buf,
DNS_LOGCATEGORY_RESOLVER,
DNS_LOGMODULE_RESOLVER,
ISC_LOG_DEBUG(3), fctx->res->mctx);
}
dns_adb_changeflags(fctx->adb, query->addrinfo,
DNS_FETCHOPT_NOEDNS0,
DNS_FETCHOPT_NOEDNS0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment