[nginx] Resolver: improved error messages (ticket #2024).
Maxim Dounin
mdounin at mdounin.ru
Mon Sep 28 16:15:46 UTC 2020
details: https://hg.nginx.org/nginx/rev/8fe7ebe5adc4
branches:
changeset: 7718:8fe7ebe5adc4
user: Maxim Dounin <mdounin at mdounin.ru>
date: Mon Sep 28 17:41:22 2020 +0300
description:
Resolver: improved error messages (ticket #2024).
diffstat:
src/core/ngx_resolver.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diffs (144 lines):
diff -r e3e8b8234f05 -r 8fe7ebe5adc4 src/core/ngx_resolver.c
--- a/src/core/ngx_resolver.c Mon Sep 28 17:07:48 2020 +0300
+++ b/src/core/ngx_resolver.c Mon Sep 28 17:41:22 2020 +0300
@@ -1918,7 +1918,7 @@ ngx_resolver_process_a(ngx_resolver_t *r
if (rn == NULL) {
ngx_log_error(r->log_level, r->log, 0,
- "unexpected response for %V", &name);
+ "unexpected DNS response for %V", &name);
ngx_resolver_free(r, name.data);
goto failed;
}
@@ -1930,7 +1930,7 @@ ngx_resolver_process_a(ngx_resolver_t *r
if (rn->query6 == NULL || rn->naddrs6 != (u_short) -1) {
ngx_log_error(r->log_level, r->log, 0,
- "unexpected response for %V", &name);
+ "unexpected DNS response for %V", &name);
ngx_resolver_free(r, name.data);
goto failed;
}
@@ -1949,7 +1949,7 @@ ngx_resolver_process_a(ngx_resolver_t *r
if (rn->query == NULL || rn->naddrs != (u_short) -1) {
ngx_log_error(r->log_level, r->log, 0,
- "unexpected response for %V", &name);
+ "unexpected DNS response for %V", &name);
ngx_resolver_free(r, name.data);
goto failed;
}
@@ -1964,7 +1964,7 @@ ngx_resolver_process_a(ngx_resolver_t *r
if (ident != qident) {
ngx_log_error(r->log_level, r->log, 0,
- "wrong ident %ui response for %V, expect %ui",
+ "wrong ident %ui in DNS response for %V, expect %ui",
ident, &name, qident);
ngx_resolver_free(r, name.data);
goto failed;
@@ -2149,7 +2149,7 @@ ngx_resolver_process_a(ngx_resolver_t *r
if (class != 1) {
ngx_log_error(r->log_level, r->log, 0,
- "unexpected RR class %ui", class);
+ "unexpected RR class %ui in DNS response", class);
goto failed;
}
@@ -2218,7 +2218,7 @@ ngx_resolver_process_a(ngx_resolver_t *r
default:
ngx_log_error(r->log_level, r->log, 0,
- "unexpected RR type %ui", type);
+ "unexpected RR type %ui in DNS response", type);
}
i += len;
@@ -2567,7 +2567,7 @@ ngx_resolver_process_srv(ngx_resolver_t
if (rn == NULL || rn->query == NULL) {
ngx_log_error(r->log_level, r->log, 0,
- "unexpected response for %V", &name);
+ "unexpected DNS response for %V", &name);
ngx_resolver_free(r, name.data);
goto failed;
}
@@ -2581,7 +2581,7 @@ ngx_resolver_process_srv(ngx_resolver_t
if (ident != qident) {
ngx_log_error(r->log_level, r->log, 0,
- "wrong ident %ui response for %V, expect %ui",
+ "wrong ident %ui in DNS response for %V, expect %ui",
ident, &name, qident);
ngx_resolver_free(r, name.data);
goto failed;
@@ -2691,7 +2691,7 @@ ngx_resolver_process_srv(ngx_resolver_t
if (class != 1) {
ngx_log_error(r->log_level, r->log, 0,
- "unexpected RR class %ui", class);
+ "unexpected RR class %ui in DNS response", class);
goto failed;
}
@@ -2734,7 +2734,7 @@ ngx_resolver_process_srv(ngx_resolver_t
default:
ngx_log_error(r->log_level, r->log, 0,
- "unexpected RR type %ui", type);
+ "unexpected RR type %ui in DNS response", type);
}
i += len;
@@ -3165,7 +3165,7 @@ valid:
if (rn == NULL || rn->query == NULL) {
ngx_log_error(r->log_level, r->log, 0,
- "unexpected response for %V", &name);
+ "unexpected DNS response for %V", &name);
ngx_resolver_free(r, name.data);
goto failed;
}
@@ -3174,7 +3174,7 @@ valid:
if (ident != qident) {
ngx_log_error(r->log_level, r->log, 0,
- "wrong ident %ui response for %V, expect %ui",
+ "wrong ident %ui in DNS response for %V, expect %ui",
ident, &name, qident);
ngx_resolver_free(r, name.data);
goto failed;
@@ -3256,7 +3256,7 @@ valid:
if (class != 1) {
ngx_log_error(r->log_level, r->log, 0,
- "unexpected RR class %ui", class);
+ "unexpected RR class %ui in DNS response", class);
goto failed;
}
@@ -3283,7 +3283,7 @@ valid:
default:
ngx_log_error(r->log_level, r->log, 0,
- "unexpected RR type %ui", type);
+ "unexpected RR type %ui in DNS response", type);
}
i += len;
@@ -3952,12 +3952,12 @@ ngx_resolver_copy(ngx_resolver_t *r, ngx
}
if (p >= last) {
- err = "name is out of response";
+ err = "name is out of DNS response";
goto invalid;
}
}
- err = "compression pointers loop";
+ err = "compression pointers loop in DNS response";
invalid:
More information about the nginx-devel
mailing list