mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-14 00:39:59 -04:00
add test for bad dig option '+ednsopt=:' being handled gracefully
(cherry picked from commitad86878d61) (cherry picked from commit9f126bac32)
This commit is contained in:
parent
d7d3383573
commit
41a632bae1
1 changed files with 9 additions and 1 deletions
|
|
@ -354,7 +354,7 @@ if [ -x ${DIG} ] ; then
|
|||
|
||||
n=`expr $n + 1`
|
||||
echo_i "checking dig +subnet with prefix lengths between byte boundaries ($n)"
|
||||
ret=0
|
||||
ret=0
|
||||
for p in 9 10 11 12 13 14 15; do
|
||||
$DIG $DIGOPTS +tcp @10.53.0.2 +subnet=10.53/$p A a.example > dig.out.test.$p.$n 2>&1 || ret=1
|
||||
grep "FORMERR" < dig.out.test.$p.$n > /dev/null && ret=1
|
||||
|
|
@ -455,6 +455,14 @@ if [ -x ${DIG} ] ; then
|
|||
grep "status: FORMERR" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
n=`expr $n + 1`
|
||||
echo_i "check that dig handles malformed option '+ednsopt=:' gracefully ($n)"
|
||||
ret=0
|
||||
$DIG $DIGOPTS @10.53.0.3 +ednsopt=: a.example > dig.out.test$n 2>&1 && ret=1
|
||||
grep "ednsopt no code point specified" dig.out.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
else
|
||||
echo_i "$DIG is needed, so skipping these dig tests"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue