--- /dev/null
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+;
+; This Source Code Form is subject to the terms of the Mozilla Public
+; License, v. 2.0. If a copy of the MPL was not distributed with this
+; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+;
+; See the COPYRIGHT file distributed with this work for additional
+; information regarding copyright ownership.
+
+$TTL 60
+@ IN SOA root.ns ns 1996072700 3600 1800 86400 60
+ NS ns
+ns A 127.0.0.1
+1000.4.0.53.10.rpz-client-ip A 10.53.0.1
--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+# common configuration
+include "named.conf.header";
+
+view "recursive" {
+ zone "." {
+ type hint;
+ file "root.hint";
+ };
+
+ # policy configuration to be tested
+ response-policy {
+ zone "invalidprefixlength";
+ };
+
+ # policy zones to be tested
+ zone "invalidprefixlength" { type master; file "db.invalidprefixlength"; };
+};
status=1
}
+ # Check for invalid prefix length error
+ t=`expr $t + 1`
+ echo_i "testing for invalid prefix length error (${t})"
+ add_test_marker 10.53.0.2
+ run_server invalidprefixlength
+ grep "invalid rpz IP address \"1000.4.0.53.10.rpz-client-ip.invalidprefixlength\"; invalid prefix length of 1000$" ns2/named.run > /dev/null || {
+ echo_i " failed: expected that invalid prefix length error would be logged"
+ status=1
+ }
+
t=`expr $t + 1`
echo_i "checking 'nsip-wait-recurse no' is faster than 'nsip-wait-recurse yes' ($t)"
add_test_marker 10.53.0.2
./bin/tests/system/rpzrecurse/ns2/db.clientip1 ZONE 2015,2016,2018
./bin/tests/system/rpzrecurse/ns2/db.clientip2 ZONE 2015,2016,2018
./bin/tests/system/rpzrecurse/ns2/db.clientip21 ZONE 2016,2018
+./bin/tests/system/rpzrecurse/ns2/db.invalidprefixlength ZONE 2018
./bin/tests/system/rpzrecurse/ns2/db.log1 ZONE 2015,2016,2018
./bin/tests/system/rpzrecurse/ns2/db.log2 ZONE 2015,2016,2018
./bin/tests/system/rpzrecurse/ns2/db.log3 ZONE 2015,2016,2018
./bin/tests/system/rpzrecurse/ns2/named.clientip2.conf CONF-C 2016,2017,2018
./bin/tests/system/rpzrecurse/ns2/named.conf.header.in CONF-C 2015,2016,2017,2018
./bin/tests/system/rpzrecurse/ns2/named.default.conf CONF-C 2015,2016,2018
+./bin/tests/system/rpzrecurse/ns2/named.invalidprefixlength.conf CONF-C 2018
./bin/tests/system/rpzrecurse/ns2/named.log.conf CONF-C 2015,2016,2017,2018
./bin/tests/system/rpzrecurse/ns2/named.max.conf CONF-C 2018
./bin/tests/system/rpzrecurse/ns2/named.wildcard1.conf CONF-C 2015,2016,2017,2018