mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Tweak logging for truncated replies.
This commit is contained in:
@@ -873,6 +873,7 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
|
|||||||
if (!(ansp = skip_questions(header, qlen)))
|
if (!(ansp = skip_questions(header, qlen)))
|
||||||
return 0; /* bad packet */
|
return 0; /* bad packet */
|
||||||
anscount = authcount = 0;
|
anscount = authcount = 0;
|
||||||
|
log_query(F_AUTH, "query", NULL, "truncated", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((auth || local_query) && nxdomain)
|
if ((auth || local_query) && nxdomain)
|
||||||
|
|||||||
@@ -737,7 +737,7 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (header->hb3 & HB3_TC)
|
if (header->hb3 & HB3_TC)
|
||||||
log_query(F_UPSTREAM, NULL, NULL, "truncated", 0);
|
log_query(F_UPSTREAM, "query", NULL, "truncated", 0);
|
||||||
else if (!bogusanswer || (header->hb4 & HB4_CD))
|
else if (!bogusanswer || (header->hb4 & HB4_CD))
|
||||||
{
|
{
|
||||||
if (rcode == NXDOMAIN && extract_request(header, n, daemon->namebuff, NULL) &&
|
if (rcode == NXDOMAIN && extract_request(header, n, daemon->namebuff, NULL) &&
|
||||||
|
|||||||
@@ -2332,6 +2332,7 @@ size_t answer_request(struct dns_header *header, char *limit, size_t qlen,
|
|||||||
if (!(ansp = skip_questions(header, qlen)))
|
if (!(ansp = skip_questions(header, qlen)))
|
||||||
return 0; /* bad packet */
|
return 0; /* bad packet */
|
||||||
anscount = nscount = addncount = 0;
|
anscount = nscount = addncount = 0;
|
||||||
|
log_query(F_CONFIG, "query", NULL, "truncated", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nxdomain)
|
if (nxdomain)
|
||||||
|
|||||||
Reference in New Issue
Block a user