2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Prevent TCP failures from affecting EDNS stats

EDNS mechanisms only apply to DNS over UDP.  Thus, errors encountered
while sending DNS queries over TCP must not influence EDNS timeout
statistics.
This commit is contained in:
Michał Kępień
2019-10-31 08:48:35 +01:00
parent 7346e6d3b5
commit fce3c93ea2
2 changed files with 32 additions and 5 deletions

View File

@@ -241,6 +241,18 @@ fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
echo_i "checking that TCP failures do not influence EDNS statistics in the ADB ($n)"
ret=0
rndc_dumpdb ns1 -adb || ret=1
timeouts512=`sed -n "s|.*10\.53\.0\.7.*\[edns \([0-9/][0-9/]*\).*|\1|p" ns1/named_dump.db.test$n | awk -F/ '{print $NF}'`
if [ $timeouts512 -ne 0 ]; then
echo_i "512-byte EDNS timeouts according to ADB: $timeouts512, expected: 0"
ret=1
fi
if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
$PERL $SYSTEMTESTTOP/stop.pl --use-rndc --port ${CONTROLPORT} legacy ns1
copy_setports ns1/named2.conf.in ns1/named.conf
$PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} legacy ns1