Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
2b786105
Commit
2b786105
authored
Apr 29, 2014
by
Evan Hunt
Browse files
[master] reduce EDNS logging noise
3831. [cleanup] Reduce logging noise when EDNS state changes occur. [RT #35843]
parent
0dc0b029
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
2b786105
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]
...
...
lib/dns/resolver.c
View file @
2b786105
...
...
@@ -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
_LOG
CATEGORY_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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment