4483. [func] Check prefixes in acls to make sure the address and

prefix lengths are consistent.  Warn only in
                        BIND 9.11 and earlier. [RT #43367]
This commit is contained in:
Mark Andrews
2016-10-11 15:04:34 +11:00
parent 311060a573
commit 883e29ab4f
4 changed files with 14 additions and 4 deletions
+4
View File
@@ -1,3 +1,7 @@
4483. [func] Check prefixes in acls to make sure the address and
prefix lengths are consistent. Warn only in
BIND 9.11 and earlier. [RT #43367]
4482. [bug] Address use before require check and remove extraneous
dns_message_gettsigkey call in dns_tsig_sign.
[RT #43374]
+1 -1
View File
@@ -16,7 +16,7 @@
acl a {
{ "none"; };
{ !19.0.0.0/0; };
{ !19.0.0.0/8; };
};
options {
+1 -1
View File
@@ -49,7 +49,7 @@ zone "example" {
zone "example.com" {
type master;
file "example.com.db.signed";
allow-update { 10.53.0.0/8; };
allow-update { 10.53.0.0/16; };
};
zone "good" {
+8 -2
View File
@@ -15,8 +15,6 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id$ */
#include <config.h>
#include <isc/mem.h>
@@ -391,6 +389,14 @@ cfg_acl_fromconfig2(const cfg_obj_t *caml, const cfg_obj_t *cctx,
dns_acl_detach(&de->nestedacl);
continue;
}
result = isc_netaddr_prefixok(&addr, bitlen);
if (result != ISC_R_SUCCESS) {
char buf[ISC_NETADDR_FORMATSIZE + 1];
isc_netaddr_format(&addr, buf, sizeof(buf));
cfg_obj_log(ce, lctx, ISC_LOG_WARNING,
"'%s/%u': address/prefix length "
"mismatch", buf, bitlen);
}
/*
* If nesting ACLs (nest_level != 0), we negate