Check rcode is FORMERR

(cherry picked from commit 88ff6b846c)
This commit is contained in:
Mark Andrews
2020-07-31 20:36:14 +10:00
parent 2dc26ebdb6
commit 20bc6aefff
5 changed files with 86 additions and 2 deletions

View File

@@ -222,5 +222,17 @@ if [ $ret -eq 1 ] ; then
echo_i "failed"; status=1
fi
if "$PERL" -e 'use Net::DNS; use Net::DNS::Packet;' > /dev/null 2>&1
then
echo_i "check that TSIG in the wrong place returns FORMERR"
ret=0
$PERL ../packet.pl -a 10.53.0.1 -p ${PORT} -t udp -d < badlocation > packet.out
grep "rcode = FORMERR" packet.out > /dev/null || ret=1
if [ $ret -eq 1 ] ; then
echo_i "failed"; status=1
fi
fi
echo_i "exit status: $status"
[ $status -eq 0 ] || exit 1