if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
status=`expr $status + $ret`
+n=`expr $n + 1`
+echo_i "check that invalid address/prefix length generates a warning ($n)"
+ret=0
+$CHECKCONF warn-address-prefix-length-mismatch.conf > checkconf.out$n 2>/dev/null || ret=1
+LINES=$(grep -c "address/prefix length mismatch" < checkconf.out$n) || ret=1
+[ "$LINES" -eq 8 ] || ret=1
+if [ $ret != 0 ]; then echo_i "failed"; ret=1; fi
+status=`expr $status + $ret`
+
n=`expr $n + 1`
echo_i "check that 'dnssec-lookaside . trust-anchor dlv.example.com;' doesn't generates a warning ($n)"
ret=0
"invalid prefix length");
return (ISC_R_RANGE);
}
- result = isc_netaddr_prefixok(&netaddr, prefixlen);
- if (result != ISC_R_SUCCESS) {
- char buf[ISC_NETADDR_FORMATSIZE + 1];
- isc_netaddr_format(&netaddr, buf, sizeof(buf));
- cfg_parser_error(pctx, CFG_LOG_NOPREP,
- "'%s/%u': address/prefix length "
- "mismatch", buf, prefixlen);
- return (ISC_R_FAILURE);
- }
} else {
if (expectprefix) {
cfg_parser_error(pctx, CFG_LOG_NEAR,
./bin/tests/system/checkconf/bad-in-view-dup.conf CONF-C 2018,2019,2020
./bin/tests/system/checkconf/bad-inline-slave.conf CONF-C 2013,2016,2018,2019,2020
./bin/tests/system/checkconf/bad-ipv4-prefix-dotted1.conf CONF-C 2019,2020
-./bin/tests/system/checkconf/bad-ipv4-prefix-dotted2.conf CONF-C 2019,2020
./bin/tests/system/checkconf/bad-ipv4-prefix2.conf CONF-C 2019,2020
./bin/tests/system/checkconf/bad-keep-response-order.conf CONF-C 2015,2016,2018,2019,2020
./bin/tests/system/checkconf/bad-lifetime.conf CONF-C 2014,2016,2018,2019,2020
./bin/tests/system/checkconf/view-class-any2.conf CONF-C 2016,2018,2019,2020
./bin/tests/system/checkconf/view-class-in1.conf CONF-C 2016,2018,2019,2020
./bin/tests/system/checkconf/view-class-in2.conf CONF-C 2016,2018,2019,2020
+./bin/tests/system/checkconf/warn-address-prefix-length-mismatch.conf CONF-C 2020
./bin/tests/system/checkconf/warn-dlv-auto.conf CONF-C 2017,2018,2019,2020
./bin/tests/system/checkconf/warn-dlv-dlv.isc.org.conf CONF-C 2017,2018,2019,2020
./bin/tests/system/checkconf/warn-duplicate-key.conf CONF-C 2019,2020