summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-01-24 12:28:33 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-01-24 12:28:33 -0200
commit5440451927ac20d486cad52fcfac5d2efa363683 (patch)
tree1637816972b91322fc31dea5d508968b9d817b4c /usr/local/www/services_dhcp.php
parent736698bd60fc0d10d05acd4888ae51a745e6d540 (diff)
downloadpfsense-5440451927ac20d486cad52fcfac5d2efa363683.zip
pfsense-5440451927ac20d486cad52fcfac5d2efa363683.tar.gz
Move is_inrange() to util.inc and rename it to is_inrange_v4()
Diffstat (limited to 'usr/local/www/services_dhcp.php')
-rwxr-xr-xusr/local/www/services_dhcp.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index a0b85e7..fcaad50 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -199,13 +199,6 @@ if (is_array($dhcpdconf)) {
$ifcfgip = $config['interfaces'][$if]['ipaddr'];
$ifcfgsn = $config['interfaces'][$if]['subnet'];
-function is_inrange($test, $start, $end) {
- if ( (ip2ulong($test) <= ip2ulong($end)) && (ip2ulong($test) >= ip2ulong($start)) )
- return true;
- else
- return false;
-}
-
function validate_partial_mac_list($maclist) {
$macs = explode(',', $maclist);
@@ -299,7 +292,7 @@ if ($_POST) {
if (is_array($config['virtualip']['vip'])) {
foreach($config['virtualip']['vip'] as $vip) {
if($vip['interface'] == $if)
- if($vip['subnet'] && is_inrange($vip['subnet'], $_POST['range_from'], $_POST['range_to']))
+ if($vip['subnet'] && is_inrange_v4($vip['subnet'], $_POST['range_from'], $_POST['range_to']))
$input_errors[] = sprintf(gettext("The subnet range cannot overlap with virtual IP address %s."),$vip['subnet']);
}
}
OpenPOWER on IntegriCloud