aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/net/gethostbydns.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/gethostbydns.c')
-rw-r--r--lib/libc/net/gethostbydns.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c
index b29fa1cdd845..216fc9bcf9a4 100644
--- a/lib/libc/net/gethostbydns.c
+++ b/lib/libc/net/gethostbydns.c
@@ -74,8 +74,10 @@
#define SPRINTF(x) ((size_t)sprintf x)
+#ifdef DEBUG
static const char AskedForGot[] =
"gethostby*.gethostanswer: asked for \"%s\", got \"%s\"";
+#endif
#ifdef RESOLVSORT
static void addrsort(char **, int, res_state);
@@ -299,8 +301,10 @@ gethostanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
switch (type) {
case T_PTR:
if (strcasecmp(tname, bp) != 0) {
+#ifdef DEBUG
syslog(LOG_NOTICE|LOG_AUTH,
AskedForGot, qname, bp);
+#endif
cp += n;
continue; /* XXX - had_error++ ? */
}
@@ -347,8 +351,10 @@ gethostanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
case T_A:
case T_AAAA:
if (strcasecmp(he->h_name, bp) != 0) {
+#ifdef DEBUG
syslog(LOG_NOTICE|LOG_AUTH,
AskedForGot, he->h_name, bp);
+#endif
cp += n;
continue; /* XXX - had_error++ ? */
}