diff options
author | jim-p <jimp@pfsense.org> | 2011-09-21 16:14:17 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-09-21 16:14:17 -0400 |
commit | 4e85523b254c41291c0df19d0818c2320fcc6a8b (patch) | |
tree | 6ac4ea4055c284fbfa4ae88bc68e6b0a7d7de07c /usr/local | |
parent | 4151bdba8c448ccc259ed5a4de53073fae45e406 (diff) | |
download | pfsense-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.php | 4 |
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; } } |