]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4312. [bug] dig's unknown dns and edns flags (MBZ value) logging
authorMark Andrews <marka@isc.org>
Tue, 2 Feb 2016 03:19:22 +0000 (14:19 +1100)
committerMark Andrews <marka@isc.org>
Tue, 2 Feb 2016 03:19:22 +0000 (14:19 +1100)
                        was not consistent. [RT #41600]

CHANGES
bin/tests/system/ednscompliance/tests.sh
lib/dns/message.c

diff --git a/CHANGES b/CHANGES
index 689d283673bec7cc461c4a86b9cb0d738699b031..79aacf233d0e58141598b4a411d1e740b8f81490 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4312.  [bug]           dig's unknown dns and edns flags (MBZ value) logging
+                       was not consistent. [RT #41600]
+
 4311.  [bug]           Prevent "rndc delzone" from being used on
                        response-policy zones. [RT #41593]
 
index b8f3b9a3bdbf3f9177f3e1fa9f7021e8f51ef2a0..3693fd77f24bb27706d25fb35c4a1d32eaca4360 100644 (file)
@@ -38,10 +38,10 @@ if [ $ret != 0 ]; then echo "I:failed $reason"; fi
 status=`expr $status + $ret`
 
 n=`expr $n + 1`
-echo "I:check +ednsflags=0x80 sets flags to 0080 ($n)"
+echo "I:check +ednsflags=0x80 sets flags to 0x0080 ($n)"
 ret=0 reason=
 $DIG -p 5300 @10.53.0.1 +qr +norec +ednsflags=0x80 soa $zone > dig.out$n
-grep "MBZ: 0080" dig.out$n > /dev/null || { ret=1; reason="flags"; }
+grep "MBZ: 0x0080," dig.out$n > /dev/null || { ret=1; reason="flags"; }
 if [ $ret != 0 ]; then echo "I:failed $reason"; fi
 status=`expr $status + $ret`
 
index e2d15e931bf0c9874709ea33fca1c61f7918469e..7a7aa7b921f59e5fec53ccbccd7640858ac4ee67 100644 (file)
@@ -3327,7 +3327,7 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
                mbz &= ~DNS_MESSAGEEXTFLAG_DO;          /* Known Flags. */
                if (mbz != 0) {
                        ADD_STRING(target, "; MBZ: ");
-                       snprintf(buf, sizeof(buf), "%.4x ", mbz);
+                       snprintf(buf, sizeof(buf), "0x%.4x", mbz);
                        ADD_STRING(target, buf);
                        ADD_STRING(target, ", udp: ");
                } else