Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
633
Issues
633
List
Boards
Labels
Service Desk
Milestones
Merge Requests
105
Merge Requests
105
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
8b9230aa
Commit
8b9230aa
authored
Jun 19, 2019
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
also log the error path
parent
6e85ad84
Pipeline
#46822
failed with stages
in 78 minutes and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
lib/ns/query.c
lib/ns/query.c
+12
-4
No files found.
lib/ns/query.c
View file @
8b9230aa
...
...
@@ -521,7 +521,7 @@ inc_stats(ns_client_t *client, isc_statscounter_t counter) {
}
static inline void
log_response(ns_client_t *client) {
log_response(ns_client_t *client
, dns_rcode_t rcode
) {
char namebuf[DNS_NAME_FORMATSIZE];
char typebuf[DNS_RDATATYPE_FORMATSIZE];
char classbuf[DNS_RDATACLASS_FORMATSIZE];
...
...
@@ -537,7 +537,7 @@ log_response(ns_client_t *client) {
sizeof(classbuf));
dns_rdatatype_format(client->query.qtype, typebuf, sizeof(typebuf));
isc_buffer_init(&b, rcodebuf, sizeof(rcodebuf));
dns_rcode_totext(
client->message->
rcode, &b);
dns_rcode_totext(rcode, &b);
ns_client_log(client, NS_LOGCATEGORY_QUERIES, NS_LOGMODULE_QUERY, level,
"response: %s %s %s %.*s", namebuf, classbuf, typebuf,
...
...
@@ -574,7 +574,7 @@ query_send(ns_client_t *client) {
}
if ((client->sctx->options & NS_SERVER_LOGRESPONSES) != 0) {
log_response(client);
log_response(client
, client->message->rcode
);
}
inc_stats(client, counter);
...
...
@@ -585,8 +585,10 @@ query_send(ns_client_t *client) {
static void
query_error(ns_client_t *client, isc_result_t result, int line) {
int loglevel = ISC_LOG_DEBUG(3);
dns_rcode_t rcode;
switch (dns_result_torcode(result)) {
rcode = dns_result_torcode(result);
switch (rcode) {
case dns_rcode_servfail:
loglevel = ISC_LOG_DEBUG(1);
inc_stats(client, ns_statscounter_servfail);
...
...
@@ -605,6 +607,12 @@ query_error(ns_client_t *client, isc_result_t result, int line) {
log_queryerror(client, result, line, loglevel);
if (client->query.origqname != NULL &&
(client->sctx->options & NS_SERVER_LOGRESPONSES) != 0)
{
log_response(client, rcode);
}
ns_client_error(client, result);
isc_nmhandle_unref(client->handle);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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