]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
suppress unnecessary zone transfer
authorMark Andrews <marka@isc.org>
Tue, 10 Dec 2019 03:53:00 +0000 (14:53 +1100)
committerMichał Kępień <michal@isc.org>
Tue, 14 Jan 2020 10:54:58 +0000 (11:54 +0100)
suppressed unnecessary zone transfer in "test mapped zone with
out of zone data" sub-test.

(cherry picked from commit 9bd6720f581e5934c94cf7206c22a158f74c1902)

bin/tests/system/xfer/tests.sh

index 524d6474f4d8c7c1bb58b9f487a55b12ddb45bae..b9fadaadb1c34ca1955e2503a27e51dd776717e8 100755 (executable)
@@ -431,14 +431,17 @@ fi
 n=`expr $n + 1`
 echo_i "test mapped zone with out of zone data ($n)"
 tmp=0
-$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.1.$n
-grep "status: NOERROR," dig.out.1.$n > /dev/null || tmp=1
+$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.1
+grep "status: NOERROR," dig.out.1 > /dev/null || tmp=1
 $PERL $SYSTEMTESTTOP/stop.pl xfer ns3
 $PERL $SYSTEMTESTTOP/start.pl --noclean --restart --port ${PORT} xfer ns3
-$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2.$n
-grep "status: NOERROR," dig.out.2.$n > /dev/null || tmp=1
-$DIG -p ${PORT} axfr mapped @10.53.0.3 > dig.out.3.$n
-digcomp knowngood.mapped dig.out.3.$n || tmp=1
+$DIG -p ${PORT} txt mapped @10.53.0.3 > dig.out.2
+grep "status: NOERROR," dig.out.2 > /dev/null || tmp=1
+if [ "$tmp" -eq 0 ]
+then
+       $DIG -p ${PORT} axfr mapped @10.53.0.3 > dig.out.3
+       digcomp knowngood.mapped dig.out.3 || tmp=1
+fi
 if test $tmp != 0 ; then echo_i "failed"; fi
 status=`expr $status + $tmp`