mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-23 18:04:10 -05:00
Fix 'addr', 'ckresult' and 'drop' functions
'addr', 'ckresult' and 'drop' should return 0 rather than 1 after calling 'setret' as the error has been logged and these functions are not expect to fail.
This commit is contained in:
parent
a5cf49c378
commit
1394f12a1c
1 changed files with 6 additions and 6 deletions
|
|
@ -355,13 +355,13 @@ ckresult () {
|
|||
grep -q 'Truncated, retrying in TCP' $DIGNM && trunc=1 || trunc=0
|
||||
if [ "$tcp" -ne "$trunc" ]; then
|
||||
setret "'dig $digarg' wrong; no or unexpected truncation in $DIGNM"
|
||||
return 1
|
||||
else
|
||||
clean_result ${DIGNM}*
|
||||
fi
|
||||
clean_result ${DIGNM}*
|
||||
return 0
|
||||
fi
|
||||
setret "'dig $digarg' wrong; diff $DIGNM $2"
|
||||
return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
# check only that the server does not crash
|
||||
|
|
@ -409,11 +409,11 @@ addr () {
|
|||
ADDR_TTL=$(sed -n -e "s/^[-.a-z0-9]\{1,\}[ ]*\([0-9]*\) IN AA* ${ADDR_ESC}\$/\1/p" $DIGNM)
|
||||
if test -z "$ADDR_TTL"; then
|
||||
setret "'dig $2' wrong; no address $ADDR record in $DIGNM"
|
||||
return 1
|
||||
return 0
|
||||
fi
|
||||
if test -n "$3" && test "$ADDR_TTL" -ne "$3"; then
|
||||
setret "'dig $2' wrong; TTL=$ADDR_TTL instead of $3 in $DIGNM"
|
||||
return 1
|
||||
return 0
|
||||
fi
|
||||
clean_result ${DIGNM}*
|
||||
}
|
||||
|
|
@ -455,7 +455,7 @@ drop () {
|
|||
return 0
|
||||
fi
|
||||
setret "'dig $1' wrong; response in $DIGNM"
|
||||
return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
nsd() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue