mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 07:00:00 -04:00
Modify message_sectiontotext() to use update section names when opcode
is update.
This commit is contained in:
parent
f3b52d9fe5
commit
58c40ca8bd
1 changed files with 13 additions and 1 deletions
|
|
@ -79,6 +79,13 @@ static const char *sectiontext[] = {
|
|||
"ADDITIONAL"
|
||||
};
|
||||
|
||||
static const char *updsectiontext[] = {
|
||||
"ZONE",
|
||||
"PREREQUISITE",
|
||||
"UPDATE",
|
||||
"ADDITIONAL"
|
||||
};
|
||||
|
||||
static const char *opcodetext[] = {
|
||||
"QUERY",
|
||||
"IQUERY",
|
||||
|
|
@ -2716,7 +2723,12 @@ dns_message_sectiontotext(dns_message_t *msg, dns_section_t section,
|
|||
|
||||
if ((flags & DNS_MESSAGETEXTFLAG_NOCOMMENTS) == 0) {
|
||||
ADD_STRING(target, ";; ");
|
||||
ADD_STRING(target, sectiontext[section]);
|
||||
if (msg->opcode != dns_opcode_update) {
|
||||
ADD_STRING(target, sectiontext[section]);
|
||||
}
|
||||
else {
|
||||
ADD_STRING(target, updsectiontext[section]);
|
||||
}
|
||||
ADD_STRING(target, " SECTION:\n");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue