diff --git a/src/dns_forward.c b/src/dns_forward.c index 95b9ed93e..58418c62f 100644 --- a/src/dns_forward.c +++ b/src/dns_forward.c @@ -55,13 +55,15 @@ process_dns_response(char *response, int response_len) } int msg_count = ns_msg_count(handle, ns_s_an); + debug(LOG_DEBUG, "DNS response contains %d answers", msg_count); for (int i = 0; i < msg_count; i++) { ns_rr rr; if (ns_parserr(&handle, ns_s_an, i, &rr) < 0) { debug(LOG_WARNING, "ns_parserr: %s", strerror(errno)); continue; } - + debug(LOG_DEBUG, "DNS response type: %d", ns_rr_type(rr)); + if (ns_rr_type(rr) == ns_t_a) { t_domain_trusted *p = NULL; char domain[NS_MAXDNAME] = {0};