summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/services_dhcp.php')
-rwxr-xr-xusr/local/www/services_dhcp.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index e2ce65b..a144043 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -276,6 +276,17 @@ if ($_POST) {
/* make sure that the DHCP Relay isn't enabled on this interface */
if (isset($config['dhcrelay'][$if]['enable']))
$input_errors[] = sprintf(gettext("You must disable the DHCP relay on the %s interface before enabling the DHCP server."),$iflist[$if]);
+
+ $dynsubnet_start = ip2ulong($_POST['range_from']);
+ $dynsubnet_end = ip2ulong($_POST['range_to']);
+ foreach ($a_maps as $map) {
+ if (empty($map['ipaddr']))
+ continue;
+ if ((ip2ulong($map['ipaddr']) > $dynsubnet_start) &&
+ (ip2ulong($map['ipaddr']) < $dynsubnet_end)) {
+ $input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings."));
+ }
+ }
}
}
OpenPOWER on IntegriCloud