mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 14:25:41 +00:00
[master] Relax restriction on prefix pools being within the subnet
This commit is contained in:
6
RELNOTES
6
RELNOTES
@@ -167,6 +167,12 @@ by Eric Young (eay@cryptsoft.com).
|
|||||||
Thanks to Jiri Popelka at Red Hat for the patch.
|
Thanks to Jiri Popelka at Red Hat for the patch.
|
||||||
[ISC-Bugs #36978]
|
[ISC-Bugs #36978]
|
||||||
|
|
||||||
|
- Relax the requirement that prefix pools must be within the subnet.
|
||||||
|
This was added in as part of #32453 in order to avoid configuration
|
||||||
|
mistakes but is being removed as prefixes aren't required to be
|
||||||
|
within the same subnet and many people configure them in that fashion.
|
||||||
|
[ISC-Bugs #40077]
|
||||||
|
|
||||||
Changes since 4.3.2rc2
|
Changes since 4.3.2rc2
|
||||||
- None
|
- None
|
||||||
|
|
||||||
|
@@ -4169,6 +4169,12 @@ parse_prefix6(struct parse *cfile,
|
|||||||
return;
|
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 */
|
/* Make sure starting prefix is within the subnet */
|
||||||
if (!addr_eq(group->subnet->net,
|
if (!addr_eq(group->subnet->net,
|
||||||
subnet_number(lo, group->subnet->netmask))) {
|
subnet_number(lo, group->subnet->netmask))) {
|
||||||
@@ -4177,11 +4183,18 @@ parse_prefix6(struct parse *cfile,
|
|||||||
skip_to_semi(cfile);
|
skip_to_semi(cfile);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!parse_ip6_addr(cfile, &hi)) {
|
if (!parse_ip6_addr(cfile, &hi)) {
|
||||||
return;
|
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 */
|
/* Make sure ending prefix is within the subnet */
|
||||||
if (!addr_eq(group->subnet->net,
|
if (!addr_eq(group->subnet->net,
|
||||||
subnet_number(hi, group->subnet->netmask))) {
|
subnet_number(hi, group->subnet->netmask))) {
|
||||||
@@ -4190,6 +4203,7 @@ parse_prefix6(struct parse *cfile,
|
|||||||
skip_to_semi(cfile);
|
skip_to_semi(cfile);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Next is '/' number ';'.
|
* Next is '/' number ';'.
|
||||||
@@ -4213,11 +4227,20 @@ parse_prefix6(struct parse *cfile,
|
|||||||
parse_warn(cfile, "networks have 0 to 128 bits (exclusive)");
|
parse_warn(cfile, "networks have 0 to 128 bits (exclusive)");
|
||||||
return;
|
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) {
|
if (bits < group->subnet->prefix_len) {
|
||||||
parse_warn(cfile, "network mask smaller than subnet mask");
|
parse_warn(cfile, "network mask smaller than subnet mask");
|
||||||
skip_to_semi(cfile);
|
skip_to_semi(cfile);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!is_cidr_mask_valid(&lo, bits) ||
|
if (!is_cidr_mask_valid(&lo, bits) ||
|
||||||
!is_cidr_mask_valid(&hi, bits)) {
|
!is_cidr_mask_valid(&hi, bits)) {
|
||||||
parse_warn(cfile, "network mask too short");
|
parse_warn(cfile, "network mask too short");
|
||||||
|
Reference in New Issue
Block a user