VERBOSE_MSG("<= malformed response\n");
return resolve_badmsg(pkt, req, query);
} else if (!is_paired_to_query(pkt, query)) {
- VERBOSE_MSG("<= ignoring mismatching response\n");
+ WITH_VERBOSE(query) {
+ const char *ns_str =
+ req->upstream.addr ? kr_straddr(req->upstream.addr) : "(internal)";
+ VERBOSE_MSG("<= ignoring mismatching response from %s\n",
+ ns_str ? ns_str : "(kr_straddr failed)");
+ }
/* Force TCP, to work around authoritatives messing up question
* without yielding to spoofed responses. */
query->flags.TCP = true;