mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Improved printing of DynDNS packets in *totext.
This commit is contained in:
@@ -2852,17 +2852,32 @@ dns_message_totext(dns_message_t *msg, dns_messagetextflag_t flags,
|
||||
ADD_STRING(target, "ad ");
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0)
|
||||
ADD_STRING(target, "cd ");
|
||||
ADD_STRING(target, "\n; QUESTION: ");
|
||||
sprintf(buf, "%3u", msg->counts[DNS_SECTION_QUESTION]);
|
||||
if (msg->opcode != dns_opcode_update) {
|
||||
ADD_STRING(target, "; QUESTION: ");
|
||||
}
|
||||
else {
|
||||
ADD_STRING(target, "; ZONE: ");
|
||||
}
|
||||
sprintf(buf, "%1u", msg->counts[DNS_SECTION_QUESTION]);
|
||||
ADD_STRING(target, buf);
|
||||
ADD_STRING(target, ", ANSWER: ");
|
||||
sprintf(buf, "%3u", msg->counts[DNS_SECTION_ANSWER]);
|
||||
if (msg->opcode != dns_opcode_update) {
|
||||
ADD_STRING(target, ", ANSWER: ");
|
||||
}
|
||||
else {
|
||||
ADD_STRING(target, ", PREREQ: ");
|
||||
}
|
||||
sprintf(buf, "%1u", msg->counts[DNS_SECTION_ANSWER]);
|
||||
ADD_STRING(target, buf);
|
||||
ADD_STRING(target, ", AUTHORITY: ");
|
||||
sprintf(buf, "%3u", msg->counts[DNS_SECTION_AUTHORITY]);
|
||||
if (msg->opcode != dns_opcode_update) {
|
||||
ADD_STRING(target, ", AUTHORITY: ");
|
||||
}
|
||||
else {
|
||||
ADD_STRING(target, ", UPDATE: ");
|
||||
}
|
||||
sprintf(buf, "%1u", msg->counts[DNS_SECTION_AUTHORITY]);
|
||||
ADD_STRING(target, buf);
|
||||
ADD_STRING(target, ", ADDITIONAL: ");
|
||||
sprintf(buf, "%3u", msg->counts[DNS_SECTION_ADDITIONAL]);
|
||||
sprintf(buf, "%1u", msg->counts[DNS_SECTION_ADDITIONAL]);
|
||||
ADD_STRING(target, buf);
|
||||
ADD_STRING(target, "\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user