]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix IP regex used in the "resolver" system test
authorMichał Kępień <michal@isc.org>
Tue, 26 Feb 2019 11:33:19 +0000 (12:33 +0100)
committerMichał Kępień <michal@isc.org>
Fri, 1 Mar 2019 06:54:10 +0000 (07:54 +0100)
If dots are not escaped in the "1.2.3.4" regular expressions used for
checking whether IP address 1.2.3.4 is present in the tested resolver's
answers, a COOKIE that matches such a regular expression will trigger a
false positive for the "resolver" system test.  Properly escape dots in
the aforementioned regular expressions to prevent that from happening.

(cherry picked from commit 70ae48e5cb56c7df23647bc511951d758e57ec88)

bin/tests/system/resolver/tests.sh

index 12d2819e30017f6115453863e08640afad0239ee..4c40c7262d34e71d2c38c79d50d23df47cebc2f0 100755 (executable)
@@ -765,7 +765,7 @@ ret=0
 $DIG $DIGOPTS @10.53.0.5 truncated.no-questions. a > dig.ns5.out.${n} || ret=1
 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null || ret=1
 grep "ANSWER: 1," dig.ns5.out.${n} > /dev/null || ret=1
-grep "1.2.3.4" dig.ns5.out.${n} > /dev/null || ret=1
+grep "1\.2\.3\.4" dig.ns5.out.${n} > /dev/null || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`
 
@@ -775,7 +775,7 @@ ret=0
 $DIG $DIGOPTS @10.53.0.5 not-truncated.no-questions. a > dig.ns5.out.${n} || ret=1
 grep "status: NOERROR" dig.ns5.out.${n} > /dev/null && ret=1
 grep "ANSWER: 1," dig.ns5.out.${n} > /dev/null && ret=1
-grep "1.2.3.4" dig.ns5.out.${n} > /dev/null && ret=1
+grep "1\.2\.3\.4" dig.ns5.out.${n} > /dev/null && ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
 status=`expr $status + $ret`