]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Wait for 'rpz: policy: reload done' to signalled before proceeding.
authorMark Andrews <marka@isc.org>
Fri, 25 Sep 2020 07:42:41 +0000 (17:42 +1000)
committerMark Andrews <marka@isc.org>
Mon, 28 Sep 2020 00:15:49 +0000 (10:15 +1000)
RPZ rules cannot be fully relied upon until the summary RPZ database is
updated after an "rndc reload".  Wait until the relevant message is
logged after an "rndc reload" to prevent false positives in the
"rpzrecurse" system test caused by the RPZ rules not yet being in effect
by the time ns3 is queried.

(cherry picked from commit bdf8194af8855b0c5199ca49f3296e1160069a88)

bin/tests/system/rpzrecurse/tests.sh

index 06c20ce9abe6b3277780640d5e71372dffc4fea3..626e29b758efb3fcdd87477a56d65acc03ac2da8 100644 (file)
@@ -511,8 +511,10 @@ for mode in native dnsrps; do
   echo_i "elasped time $p1 seconds"
 
   $RNDC  -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} flush
-  cp -f ns3/named2.conf ns3/named.conf
+  copy_setports ns3/named2.conf.in ns3/named.conf
+  nextpart ns3/named.run > /dev/null
   $RNDC  -c ../common/rndc.conf -s 10.53.0.3 -p ${CONTROLPORT} reload > /dev/null
+  wait_for_log 20 "rpz: policy: reload done" ns3/named.run || ret=1
 
   echo_i "timing 'nsip-wait-recurse no'"
   t3=`$PERL -e 'print time()."\n";'`