summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-04-25 11:11:36 -0300
committerRenato Botelho <renato@netgate.com>2017-04-25 11:11:36 -0300
commit15976e38f97d63d8b591a8d619f7382609735fc6 (patch)
treeeed8bcf1b8e7410f4a6de0470a8ec52d1bfda358 /src
parent64cbd8aa405d1c530e9bb0cd62b6fb6690571235 (diff)
parentfec2c3b73f05683b674d3b5351529268eadc8dd9 (diff)
downloadpfsense-15976e38f97d63d8b591a8d619f7382609735fc6.zip
pfsense-15976e38f97d63d8b591a8d619f7382609735fc6.tar.gz
Merge pull request #3704 from sergiocarlosmorales/add-expiration-to-ndp-page
Diffstat (limited to 'src')
-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 bdc4de2..505d27a 100644
--- a/src/usr/local/www/diag_ndp.php
+++ b/src/usr/local/www/diag_ndp.php
@@ -65,9 +65,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) {
@@ -77,6 +83,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;
}
@@ -128,10 +135,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>
@@ -164,6 +172,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