Allow reserved IP addresses to fall within the DHCP Server range. DHCPD

does not barf with these changes, so why not?
This commit is contained in:
Scott Ullrich 2008-02-03 04:23:09 +00:00
parent e2bce3426d
commit 9401053278

View File

@ -109,11 +109,6 @@ if ($_POST) {
$dynsubnet_end = ip2long($config['dhcpd'][$if]['range']['to']);
$lansubnet_start = (ip2long($ifcfg['ipaddr']) & gen_subnet_mask_long($ifcfg['subnet']));
$lansubnet_end = (ip2long($ifcfg['ipaddr']) | (~gen_subnet_mask_long($ifcfg['subnet'])));
if ((ip2long($_POST['ipaddr']) >= $dynsubnet_start) &&
(ip2long($_POST['ipaddr']) <= $dynsubnet_end)) {
$input_errors[] = "Static IP address falls within the dynamic client range.";
}
if ((ip2long($_POST['ipaddr']) < $lansubnet_start) ||
(ip2long($_POST['ipaddr']) > $lansubnet_end)) {
$input_errors[] = "The IP address must lie in the {$ifcfg['descr']} subnet.";