summaryrefslogtreecommitdiff
path: root/bin/tests/system/rpz
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tests/system/rpz')
-rw-r--r--bin/tests/system/rpz/ns3/base.db3
-rw-r--r--bin/tests/system/rpz/test110
-rw-r--r--bin/tests/system/rpz/tests.sh26
3 files changed, 34 insertions, 5 deletions
diff --git a/bin/tests/system/rpz/ns3/base.db b/bin/tests/system/rpz/ns3/base.db
index 6fd07f50..8fe8b54f 100644
--- a/bin/tests/system/rpz/ns3/base.db
+++ b/bin/tests/system/rpz/ns3/base.db
@@ -12,7 +12,7 @@
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
; PERFORMANCE OF THIS SOFTWARE.
-; $Id: base.db,v 1.3.8.1 2011-04-27 17:43:07 each Exp $
+; $Id: base.db,v 1.3.8.2 2011-06-09 00:53:54 marka Exp $
; RPZ test
@@ -33,3 +33,4 @@ $TTL 120
; for testing rrset replacement
redirect IN A 127.0.0.1
*.redirect IN A 127.0.0.1
+*.cname-redirect IN CNAME google.com.
diff --git a/bin/tests/system/rpz/test1 b/bin/tests/system/rpz/test1
index 13c946d5..c487c98e 100644
--- a/bin/tests/system/rpz/test1
+++ b/bin/tests/system/rpz/test1
@@ -12,13 +12,19 @@
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
; PERFORMANCE OF THIS SOFTWARE.
-; $Id: test1,v 1.4 2011-01-13 19:30:41 each Exp $
+; $Id: test1,v 1.4.8.1 2011-06-09 03:14:04 marka Exp $
server 10.53.0.3 5300
+; NXDOMAIN
update add a0-1.tld2.bl. 300 CNAME .
-update add a3-1.tld2.bl. 300 CNAME *.
+
+; NODATA
+update add a1-1.tld2.bl. 300 CNAME *.
+; and no assert-botch
+update add a1-2.tld2.bl. 300 DNAME example.com.
+
update add *.sub1.tld2.bl. 300 A 12.12.12.12
send
diff --git a/bin/tests/system/rpz/tests.sh b/bin/tests/system/rpz/tests.sh
index b33087ff..b01228a1 100644
--- a/bin/tests/system/rpz/tests.sh
+++ b/bin/tests/system/rpz/tests.sh
@@ -12,7 +12,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: tests.sh,v 1.3.8.1 2011-04-27 17:43:07 each Exp $
+# $Id: tests.sh,v 1.3.8.3 2011-06-09 03:14:04 marka Exp $
# test response policy zones (RPZ)
@@ -152,7 +152,9 @@ status=0
start_test "RPZ QNAME rewrites" test1
nxdomain a0-1.tld2
-nodata a3-1.tld2
+nodata a1-1.tld2
+nodata a1-2.tld2
+nodata sub.a1-2.tld2
a12 a4-1.sub1.tld2
end_test
@@ -223,6 +225,7 @@ $DIGCMD a3-1.tld2 -trrsig @$s3 > /dev/null 2>&1
$DIGCMD a3-2.tld2 -trrsig @$s3 > /dev/null 2>&1
$DIGCMD a3-5.tld2 -trrsig @$s3 > /dev/null 2>&1
$DIGCMD www.redirect -trrsig @$s3 > /dev/null 2>&1
+$DIGCMD www.cname-redirect -trrsig @$s3 > /dev/null 2>&1
$RNDC -c ../common/rndc.conf -s $s3 -p 9953 status > /dev/null 2>&1 || ret=1
if [ $ret != 0 ]; then
@@ -239,6 +242,7 @@ $DIGCMD a3-1.tld2 -tsig @$s3 > /dev/null 2>&1
$DIGCMD a3-2.tld2 -tsig @$s3 > /dev/null 2>&1
$DIGCMD a3-5.tld2 -tsig @$s3 > /dev/null 2>&1
$DIGCMD www.redirect -tsig @$s3 > /dev/null 2>&1
+$DIGCMD www.cname-redirect -tsig @$s3 > /dev/null 2>&1
$RNDC -c ../common/rndc.conf -s $s3 -p 9953 status > /dev/null 2>&1 || ret=1
if [ $ret != 0 ]; then
@@ -247,6 +251,24 @@ if [ $ret != 0 ]; then
fi
status=`expr $status + $ret`
+ret=0
+echo "I:checking ANY queries"
+# We don't actually care about the query results; the important
+# thing is the server handles SIG queries okay
+$DIGCMD a3-1.tld2 -tany @$s3 > /dev/null 2>&1
+$DIGCMD a3-2.tld2 -tany @$s3 > /dev/null 2>&1
+$DIGCMD a3-5.tld2 -tany @$s3 > /dev/null 2>&1
+$DIGCMD www.redirect -tany @$s3 > /dev/null 2>&1
+$DIGCMD www.cname-redirect -tany @$s3 > /dev/null 2>&1
+
+$RNDC -c ../common/rndc.conf -s $s3 -p 9953 status > /dev/null 2>&1 || ret=1
+if [ $ret != 0 ]; then
+ echo "I:failed";
+ (cd ..; $PERL start.pl --noclean --restart rpz ns3)
+fi
+status=`expr $status + $ret`
+
+
if test "$status" -eq 0; then
rm -f dig.out*
fi