[master] hex output mode for dnstap-read

4594.	[func]		"dnstap-read -x" prints a hex dump of the wire
			format of each logged DNS message. [RT #44816]
This commit is contained in:
Evan Hunt
2017-04-20 20:22:19 -07:00
parent 95f7e98da0
commit f5c39b072c
9 changed files with 87 additions and 15 deletions

View File

@@ -357,6 +357,14 @@ if [ $HAS_PYYAML -ne 0 ] ; then
status=`expr $status + $ret`
fi
echo "I:checking dnstap-read hex output"
hex=`$DNSTAPREAD -x ns3/dnstap.out | tail -1`
echo $hex | $WIRETEST > dnstap.hex
grep 'status: NOERROR' dnstap.hex > /dev/null 2>&1 || ret=1
grep 'ANSWER: 3, AUTHORITY: 1' dnstap.hex > /dev/null 2>&1 || ret=1
if [ $ret != 0 ]; then echo "I: failed"; fi
status=`expr $status + $ret`
if [ -n "$FSTRM_CAPTURE" ] ; then
$DIG +short @10.53.0.4 -p 5300 a.example > dig.out