Check that a 'BADTIME' response with 'QR=0' is handled as a request

This commit is contained in:
Mark Andrews
2020-03-25 17:44:51 +11:00
committed by Michał Kępień
parent 1b00c4ab65
commit 9d787ab6f0
3 changed files with 47 additions and 0 deletions

View File

@@ -213,5 +213,14 @@ ret=0
$KEYGEN -a hmac-sha256 -b 128 -n host example.net > keygen.out3 2>&1 && ret=1
grep "unknown algorithm" keygen.out3 > /dev/null || ret=1
echo_i "check that a 'BADTIME' response with 'QR=0' is handled as a request"
ret=0
$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t tcp < badtime > /dev/null
$DIG -p ${PORT} @10.53.0.1 version.bind txt ch > dig.out.verify || ret=1
grep "status: NOERROR" dig.out.verify > /dev/null || ret=1
if [ $ret -eq 1 ] ; then
echo_i "failed"; status=1
fi
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1