summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergio Carlos Morales Angeles <carloschilazo@gmail.com>2017-04-23 17:47:27 -0500
committerRenato Botelho <renato@netgate.com>2017-04-25 11:11:51 -0300
commit4d473e17ddd8b894c11d1e9a677e7dde9476a671 (patch)
treea0a7964796bc7120b12f50212b665bf08373ecdd
parent039f3db577eb62b34422889ebc7571ad5536cdd7 (diff)
downloadpfsense-4d473e17ddd8b894c11d1e9a677e7dde9476a671.zip
pfsense-4d473e17ddd8b894c11d1e9a677e7dde9476a671.tar.gz
Add expiration field to NDP listing
(cherry picked from commit fec2c3b73f05683b674d3b5351529268eadc8dd9)
-rw-r--r--src/usr/local/www/diag_ndp.php25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/usr/local/www/diag_ndp.php b/src/usr/local/www/diag_ndp.php
index 39d7ba4..68b82bc 100644
--- a/src/usr/local/www/diag_ndp.php
+++ b/src/usr/local/www/diag_ndp.php
@@ -97,9 +97,15 @@ foreach ($ifdescrs as $key =>$interface) {
$hwif[$config['interfaces'][$key]['if']] = $interface;
}
-/* Array ( [0] => Neighbor [1] => Linklayer [2] => Address
-[3] => Netif [4] => Expire [5] => S
-[6] => Flags ) */
+/*
+ * Key map for each element in $rawdata
+ * 0 => Neighbor IP
+ * 1 => Physical address (MAC)
+ * 2 => Interface
+ * 3 => Expiration
+ * 4 => State
+ * 5 => Flags
+ */
$data = array();
array_shift($rawdata);
foreach ($rawdata as $line) {
@@ -109,6 +115,7 @@ foreach ($rawdata as $line) {
$ndpent['ipv6'] = trim($elements[0]);
$ndpent['mac'] = trim($elements[1]);
$ndpent['interface'] = trim($elements[2]);
+ $ndpent['expiration'] = trim($elements[3]);
$data[] = $ndpent;
}
@@ -160,10 +167,11 @@ if (isset($deleteResultMessage, $deleteResultMessageType)) {
<table class="table table-striped table-condensed table-hover sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
- <th><?= gettext("IPv6 address"); ?></th>
- <th><?= gettext("MAC address"); ?></th>
- <th><?= gettext("Hostname"); ?></th>
- <th><?= gettext("Interface"); ?></th>
+ <th><?=gettext("IPv6 address")?></th>
+ <th><?=gettext("MAC address")?></th>
+ <th><?=gettext("Hostname")?></th>
+ <th><?=gettext("Interface")?></th>
+ <th><?=gettext("Expiration")?></th>
<th data-sortable="false"><?=gettext("Actions")?></th>
</tr>
</thead>
@@ -196,6 +204,9 @@ if (isset($deleteResultMessage, $deleteResultMessageType)) {
?>
</td>
<td>
+ <?=$entry['expiration']?>
+ </td>
+ <td>
<a class="fa fa-trash" title="<?=gettext('Delete NDP entry')?>" href="diag_ndp.php?deleteentry=<?=$entry['ipv6']?>" usepost></a>
</td>
</tr>
OpenPOWER on IntegriCloud