summaryrefslogtreecommitdiffstats
path: root/usr/local/www/status_dhcpv6_leases.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-09-21 16:16:11 -0400
committerjim-p <jimp@pfsense.org>2011-09-21 16:16:11 -0400
commit9d539cb5b87a2086d04b568fc780b1c4670f63dd (patch)
tree5423b2957fe990e15cf4b44848e9b57e180ee925 /usr/local/www/status_dhcpv6_leases.php
parent4e85523b254c41291c0df19d0818c2320fcc6a8b (diff)
downloadpfsense-9d539cb5b87a2086d04b568fc780b1c4670f63dd.zip
pfsense-9d539cb5b87a2086d04b568fc780b1c4670f63dd.tar.gz
Fix misnomer since the page was copied from dhcpv4, change references to arp to ndp instead.
Diffstat (limited to 'usr/local/www/status_dhcpv6_leases.php')
-rw-r--r--usr/local/www/status_dhcpv6_leases.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr/local/www/status_dhcpv6_leases.php b/usr/local/www/status_dhcpv6_leases.php
index 0b644ee..bbc4cb5 100644
--- a/usr/local/www/status_dhcpv6_leases.php
+++ b/usr/local/www/status_dhcpv6_leases.php
@@ -33,7 +33,7 @@
*/
/*
- pfSense_BUILDER_BINARIES: /usr/bin/awk /bin/cat /usr/sbin/arp /usr/bin/wc /usr/bin/grep
+ pfSense_BUILDER_BINARIES: /usr/bin/awk /bin/cat /usr/sbin/ndp /usr/bin/wc /usr/bin/grep
pfSense_MODULE: dhcpserver
*/
@@ -140,15 +140,15 @@ $splitpattern = "'BEGIN { RS=\"}\";} {for (i=1; i<=NF; i++) printf \"%s \", \$i;
exec("/bin/cat {$leasesfile} | {$awk} {$cleanpattern} | {$awk} {$splitpattern} | /usr/bin/grep '^ia-na'", $leases_content);
$leases_count = count($leases_content);
exec("/usr/sbin/ndp -an", $rawdata);
-$arpdata = array();
+$ndpdata = array();
foreach ($rawdata as $line) {
$elements = preg_split('/\s+/ ',$line);
if ($elements[1] != "(incomplete)") {
- $arpent = array();
+ $ndpent = array();
$ip = trim(str_replace(array('(',')'),'',$elements[0]));
- $arpent['mac'] = trim($elements[1]);
- $arpent['interface'] = trim($elements[2]);
- $arpdata[$ip] = $arpent;
+ $ndpent['mac'] = trim($elements[1]);
+ $ndpent['interface'] = trim($elements[2]);
+ $ndpdata[$ip] = $ndpent;
}
}
@@ -209,7 +209,7 @@ while($i < $leases_count) {
break;
case "iaaddr":
$leases[$l]['ip'] = $data[$f+1];
- if (in_array($leases[$l]['ip'], array_keys($arpdata))) {
+ if (in_array($leases[$l]['ip'], array_keys($ndpdata))) {
$leases[$l]['online'] = 'online';
} else {
$leases[$l]['online'] = 'offline';
@@ -305,7 +305,7 @@ foreach($config['interfaces'] as $ifname => $ifarr) {
$slease['end'] = "";
$slease['hostname'] = htmlentities($static['hostname']);
$slease['act'] = "static";
- if (in_array($slease['ip'], array_keys($arpdata))) {
+ if (in_array($slease['ip'], array_keys($ndpdata))) {
$slease['online'] = 'online';
} else {
$slease['online'] = 'offline';
@@ -404,7 +404,7 @@ foreach ($leases as $data) {
if (!empty($data['hostname'])) {
echo htmlentities($data['hostname']) . "<br/>";
}
- echo htmlentities($arpdata[$data['ip']]['mac']);
+ echo htmlentities($ndpdata[$data['ip']]['mac']);
echo "{$fspane}&nbsp;</td>\n";
if ($data['type'] != "static") {
echo "<td class=\"listr\">{$fspans}" . adjust_gmt($data['start']) . "{$fspane}&nbsp;</td>\n";
OpenPOWER on IntegriCloud