-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since 4.2.8/4.3.2 isc-dhcp-server started to check if prefix6 range is
within declared subnet and if prefix6 network mask is bigger or equal subnet mask. Remove these checks and make prefix delegation work as expected. For reference - https://redmine.pfsense.org/issues/4829 PR: 201601 Approved by: zi (maintainer) Sponsored by: Netgate
- Loading branch information
Showing
4 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- server/confpars.c.orig 2015-02-27 13:42:45 UTC | ||
| +++ server/confpars.c | ||
| @@ -3926,28 +3926,10 @@ parse_prefix6(struct parse *cfile, struc | ||
| return; | ||
| } | ||
|
|
||
| - /* Make sure starting prefix is within the subnet */ | ||
| - if (!addr_eq(group->subnet->net, | ||
| - subnet_number(lo, group->subnet->netmask))) { | ||
| - parse_warn(cfile, "prefix6 start prefix" | ||
| - " is outside the subnet"); | ||
| - skip_to_semi(cfile); | ||
| - return; | ||
| - } | ||
| - | ||
| if (!parse_ip6_addr(cfile, &hi)) { | ||
| return; | ||
| } | ||
|
|
||
| - /* Make sure ending prefix is within the subnet */ | ||
| - if (!addr_eq(group->subnet->net, | ||
| - subnet_number(hi, group->subnet->netmask))) { | ||
| - parse_warn(cfile, "prefix6 end prefix" | ||
| - " is outside the subnet"); | ||
| - skip_to_semi(cfile); | ||
| - return; | ||
| - } | ||
| - | ||
| /* | ||
| * Next is '/' number ';'. | ||
| */ | ||
| @@ -3970,11 +3952,6 @@ parse_prefix6(struct parse *cfile, struc | ||
| parse_warn(cfile, "networks have 0 to 128 bits (exclusive)"); | ||
| return; | ||
| } | ||
| - if (bits < group->subnet->prefix_len) { | ||
| - parse_warn(cfile, "network mask smaller than subnet mask"); | ||
| - skip_to_semi(cfile); | ||
| - return; | ||
| - } | ||
| if (!is_cidr_mask_valid(&lo, bits) || | ||
| !is_cidr_mask_valid(&hi, bits)) { | ||
| parse_warn(cfile, "network mask too short"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- server/confpars.c.orig 2015-02-26 19:35:43 UTC | ||
| +++ server/confpars.c | ||
| @@ -4161,28 +4161,10 @@ parse_prefix6(struct parse *cfile, | ||
| return; | ||
| } | ||
|
|
||
| - /* Make sure starting prefix is within the subnet */ | ||
| - if (!addr_eq(group->subnet->net, | ||
| - subnet_number(lo, group->subnet->netmask))) { | ||
| - parse_warn(cfile, "prefix6 start prefix" | ||
| - " is outside the subnet"); | ||
| - skip_to_semi(cfile); | ||
| - return; | ||
| - } | ||
| - | ||
| if (!parse_ip6_addr(cfile, &hi)) { | ||
| return; | ||
| } | ||
|
|
||
| - /* Make sure ending prefix is within the subnet */ | ||
| - if (!addr_eq(group->subnet->net, | ||
| - subnet_number(hi, group->subnet->netmask))) { | ||
| - parse_warn(cfile, "prefix6 end prefix" | ||
| - " is outside the subnet"); | ||
| - skip_to_semi(cfile); | ||
| - return; | ||
| - } | ||
| - | ||
| /* | ||
| * Next is '/' number ';'. | ||
| */ | ||
| @@ -4205,11 +4187,6 @@ parse_prefix6(struct parse *cfile, | ||
| parse_warn(cfile, "networks have 0 to 128 bits (exclusive)"); | ||
| return; | ||
| } | ||
| - if (bits < group->subnet->prefix_len) { | ||
| - parse_warn(cfile, "network mask smaller than subnet mask"); | ||
| - skip_to_semi(cfile); | ||
| - return; | ||
| - } | ||
| if (!is_cidr_mask_valid(&lo, bits) || | ||
| !is_cidr_mask_valid(&hi, bits)) { | ||
| parse_warn(cfile, "network mask too short"); |