mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-23 23:28:18 -04:00
1198. [bug] OPT printing style was not consistant with the way the
header fields are printed. "do" was not reported if
set. Report is any of the MBZ bits are set.
This commit is contained in:
parent
8f63de3029
commit
5d7b81d2a4
2 changed files with 20 additions and 6 deletions
4
CHANGES
4
CHANGES
|
|
@ -1,3 +1,7 @@
|
|||
1198. [bug] OPT printing style was not consistant with the way the
|
||||
header fields are printed. "do" was not reported if
|
||||
set. Report is any of the MBZ bits are set.
|
||||
|
||||
1197. [bug] Attempts to define the same acl multiple times were not
|
||||
detected.
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: message.c,v 1.205 2002/02/06 04:20:23 marka Exp $ */
|
||||
/* $Id: message.c,v 1.206 2002/02/11 02:03:23 marka Exp $ */
|
||||
|
||||
/***
|
||||
*** Imports
|
||||
|
|
@ -2935,6 +2935,7 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
|
|||
dns_name_t *name = NULL;
|
||||
isc_result_t result;
|
||||
char buf[sizeof("1234567890")];
|
||||
isc_uint32_t mbz;
|
||||
|
||||
REQUIRE(DNS_MESSAGE_VALID(msg));
|
||||
REQUIRE(target != NULL);
|
||||
|
|
@ -2948,13 +2949,22 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
|
|||
if ((flags & DNS_MESSAGETEXTFLAG_NOCOMMENTS) == 0)
|
||||
ADD_STRING(target, ";; OPT PSEUDOSECTION:\n");
|
||||
ADD_STRING(target, "; EDNS: version: ");
|
||||
sprintf(buf, "%4u",
|
||||
(unsigned int)((ps->ttl &
|
||||
snprintf(buf, sizeof(buf), "%u",
|
||||
(unsigned int)((ps->ttl &
|
||||
0x00ff0000 >> 16)));
|
||||
ADD_STRING(target, buf);
|
||||
ADD_STRING(target, ", udp=");
|
||||
sprintf(buf, "%7u\n",
|
||||
(unsigned int)ps->rdclass);
|
||||
ADD_STRING(target, ", flags:");
|
||||
if ((ps->ttl & DNS_MESSAGEEXTFLAG_DO) != 0)
|
||||
ADD_STRING(target, " do");
|
||||
mbz = ps->ttl & ~DNS_MESSAGEEXTFLAG_DO & 0xffff;
|
||||
if (mbz != 0) {
|
||||
ADD_STRING(target, "; MBZ: ");
|
||||
snprintf(buf, sizeof(buf), "%.4x ", mbz);
|
||||
ADD_STRING(target, buf);
|
||||
ADD_STRING(target, ", udp: ");
|
||||
} else
|
||||
ADD_STRING(target, "; udp: ");
|
||||
snprintf(buf, sizeof(buf), "%u\n", (unsigned int)ps->rdclass);
|
||||
ADD_STRING(target, buf);
|
||||
return (ISC_R_SUCCESS);
|
||||
case DNS_PSEUDOSECTION_TSIG:
|
||||
|
|
|
|||
Loading…
Reference in a new issue