summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_dhcp_edit.php
diff options
context:
space:
mode:
authorstilez <stilez@users.noreply.github.com>2016-01-12 08:32:58 +0000
committerstilez <stilez@users.noreply.github.com>2016-01-12 08:32:58 +0000
commit18979f69a1fbe0f338020fb922d5351cd37a81c8 (patch)
treecd12dc8e8ae46843fc44cdb16b0b9c35c76792f4 /src/usr/local/www/services_dhcp_edit.php
parentf4c114d4a6fcfcd7e69e6a009db683d78d83189d (diff)
downloadpfsense-18979f69a1fbe0f338020fb922d5351cd37a81c8.zip
pfsense-18979f69a1fbe0f338020fb922d5351cd37a81c8.tar.gz
redmine 5702 - switch to high level IPv4 functions instead of low level ip2long32() etc
Diffstat (limited to 'src/usr/local/www/services_dhcp_edit.php')
-rw-r--r--src/usr/local/www/services_dhcp_edit.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/usr/local/www/services_dhcp_edit.php b/src/usr/local/www/services_dhcp_edit.php
index 303833c..515245d 100644
--- a/src/usr/local/www/services_dhcp_edit.php
+++ b/src/usr/local/www/services_dhcp_edit.php
@@ -238,10 +238,7 @@ if ($_POST) {
/* make sure it's not within the dynamic subnet */
if ($_POST['ipaddr']) {
- $dynsubnet_start = ip2ulong($config['dhcpd'][$if]['range']['from']);
- $dynsubnet_end = ip2ulong($config['dhcpd'][$if]['range']['to']);
- if ((ip2ulong($_POST['ipaddr']) >= $dynsubnet_start) &&
- (ip2ulong($_POST['ipaddr']) <= $dynsubnet_end)) {
+ if (is_inrange_v4($_POST['ipaddr']), $config['dhcpd'][$if]['range']['from'], $config['dhcpd'][$if]['range']['to'])) {
$input_errors[] = sprintf(gettext("The IP address must not be within the DHCP range for this interface."));
}
OpenPOWER on IntegriCloud