diff options
author | Shawn Routhier <sar@isc.org> | 2015-07-16 11:13:39 -0700 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2015-07-16 11:13:39 -0700 |
commit | 7ef557023fcebc709bcc2e5db6be38981a69f792 (patch) | |
tree | ea5cc37f3b6ad9c7b7310cff21fe9958f535d397 /server/confpars.c | |
parent | 7a6c9368c9a507ebe1464609b1c1d1ba88423b02 (diff) | |
download | isc-dhcp-7ef557023fcebc709bcc2e5db6be38981a69f792.tar.gz |
[master] Relax restriction on prefix pools being within the subnet
Diffstat (limited to 'server/confpars.c')
-rw-r--r-- | server/confpars.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/server/confpars.c b/server/confpars.c index d5534549..4b2907d4 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -4169,6 +4169,12 @@ parse_prefix6(struct parse *cfile, return; } +#if 0 + /* Prefixes are not required to be within the subnet, but I'm not + * entirely sure that we won't want to revive this code as a warning + * in the future so I'm ifdeffing it + */ + /* Make sure starting prefix is within the subnet */ if (!addr_eq(group->subnet->net, subnet_number(lo, group->subnet->netmask))) { @@ -4177,11 +4183,18 @@ parse_prefix6(struct parse *cfile, skip_to_semi(cfile); return; } +#endif if (!parse_ip6_addr(cfile, &hi)) { return; } +#if 0 + /* Prefixes are not required to be within the subnet, but I'm not + * entirely sure that we won't want to revive this code as a warning + * in the future so I'm ifdeffing it + */ + /* Make sure ending prefix is within the subnet */ if (!addr_eq(group->subnet->net, subnet_number(hi, group->subnet->netmask))) { @@ -4190,6 +4203,7 @@ parse_prefix6(struct parse *cfile, skip_to_semi(cfile); return; } +#endif /* * Next is '/' number ';'. @@ -4213,11 +4227,20 @@ parse_prefix6(struct parse *cfile, parse_warn(cfile, "networks have 0 to 128 bits (exclusive)"); return; } + +#if 0 + /* Prefixes are not required to be within the subnet, but I'm not + * entirely sure that we won't want to revive this code as a warning + * in the future so I'm ifdeffing it + */ + if (bits < group->subnet->prefix_len) { parse_warn(cfile, "network mask smaller than subnet mask"); skip_to_semi(cfile); return; } +#endif + if (!is_cidr_mask_valid(&lo, bits) || !is_cidr_mask_valid(&hi, bits)) { parse_warn(cfile, "network mask too short"); |