summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-09-21 16:14:17 -0400
committerjim-p <jimp@pfsense.org>2011-09-21 16:14:17 -0400
commit4e85523b254c41291c0df19d0818c2320fcc6a8b (patch)
tree6ac4ea4055c284fbfa4ae88bc68e6b0a7d7de07c /usr/local
parent4151bdba8c448ccc259ed5a4de53073fae45e406 (diff)
downloadpfsense-4e85523b254c41291c0df19d0818c2320fcc6a8b.zip
pfsense-4e85523b254c41291c0df19d0818c2320fcc6a8b.tar.gz
Speed up display of static dhcpv6 leases by skipping an additional ndp exec for each entry, use the existing arpdata array instead.
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/status_dhcpv6_leases.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/status_dhcpv6_leases.php b/usr/local/www/status_dhcpv6_leases.php
index 60d8a91..0b644ee 100644
--- a/usr/local/www/status_dhcpv6_leases.php
+++ b/usr/local/www/status_dhcpv6_leases.php
@@ -305,12 +305,12 @@ foreach($config['interfaces'] as $ifname => $ifarr) {
$slease['end'] = "";
$slease['hostname'] = htmlentities($static['hostname']);
$slease['act'] = "static";
- $online = exec("/usr/sbin/ndp -an |/usr/bin/grep {$slease['ip']}| /usr/bin/wc -l|/usr/bin/awk '{print $1;}'");
- if ($online == 1) {
+ if (in_array($slease['ip'], array_keys($arpdata))) {
$slease['online'] = 'online';
} else {
$slease['online'] = 'offline';
}
+
$leases[] = $slease;
}
}
OpenPOWER on IntegriCloud