]> 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:53:27 +0000 (07:53 +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 89e74cd1d0dd4b7e389506b9ae73b46e542a7b96..7b3c27531b09a0fe0bbeff5a2a0c3a68c70a9583 100755 (executable)
@@ -773,7 +773,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`
 
@@ -783,7 +783,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`