summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/status_dhcp_leases.php
diff options
context:
space:
mode:
authorstilez <stilez@users.noreply.github.com>2016-01-12 08:42:07 +0000
committerstilez <stilez@users.noreply.github.com>2016-01-12 08:42:07 +0000
commit1b4a806b57dfc7847244813d2fdcd6702f792c60 (patch)
treee2afae057d297867a515ac9f689922d98028edf8 /src/usr/local/www/status_dhcp_leases.php
parentf4c114d4a6fcfcd7e69e6a009db683d78d83189d (diff)
downloadpfsense-1b4a806b57dfc7847244813d2fdcd6702f792c60.zip
pfsense-1b4a806b57dfc7847244813d2fdcd6702f792c60.tar.gz
redmine 5702 - switch to high level IPv4 functions instead of low level ip2long32() etc
Diffstat (limited to 'src/usr/local/www/status_dhcp_leases.php')
-rw-r--r--src/usr/local/www/status_dhcp_leases.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/usr/local/www/status_dhcp_leases.php b/src/usr/local/www/status_dhcp_leases.php
index 2ebbe88..be6cd23 100644
--- a/src/usr/local/www/status_dhcp_leases.php
+++ b/src/usr/local/www/status_dhcp_leases.php
@@ -394,15 +394,13 @@ foreach ($leases as $data):
$icon = 'fa-times-circle-o';
}
- $lip = ip2ulong($data['ip']);
-
if ($data['act'] != "static") {
$dlsc=0;
foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) {
if (!is_array($dhcpifconf['range'])) {
continue;
}
- if (($lip >= ip2ulong($dhcpifconf['range']['from'])) && ($lip <= ip2ulong($dhcpifconf['range']['to']))) {
+ if (is_inrange_v4($data['ip'], $dhcpifconf['range']['from'], $dhcpifconf['range']['to'])) {
$data['if'] = $dhcpif;
$dhcp_leases_subnet_counter[$dlsc]['dhcpif'] = $dhcpif;
$dhcp_leases_subnet_counter[$dlsc]['from'] = $dhcpifconf['range']['from'];
OpenPOWER on IntegriCloud