summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-06-06 19:52:28 +0700
committergnhb <gnoahb@gmail.com>2010-06-06 19:52:28 +0700
commitebdbdbc26b7b60e9a9bf9226ea3cc3306095f669 (patch)
treee0e785eb477d3367b4425cefaf34dfcfa1f584fb
parentcac14686eb66f19a9a44608aea1f087a75b0713a (diff)
downloadpfsense-ebdbdbc26b7b60e9a9bf9226ea3cc3306095f669.zip
pfsense-ebdbdbc26b7b60e9a9bf9226ea3cc3306095f669.tar.gz
Make display of interface name and uptime work again on status_interfaces.php
-rw-r--r--etc/inc/pfsense-utils.inc14
-rwxr-xr-xusr/local/www/status_interfaces.php4
2 files changed, 8 insertions, 10 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 97aa3e6..57d900f 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1171,7 +1171,7 @@ function get_interface_info($ifdescr) {
$ifinfo = array();
if (empty($config['interfaces'][$ifdescr]))
return;
- $ifinfo['hwif'] = $config['interfaces'][$if]['if'];
+ $ifinfo['hwif'] = $config['interfaces'][$ifdescr]['if'];
$ifinfo['if'] = get_real_interface($ifdescr);
$chkif = $ifinfo['if'];
@@ -1264,16 +1264,16 @@ function get_interface_info($ifdescr) {
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
- if ($config['interfaces'][$if]['ptpid'] == $ppp['ptpid'])
+ if ($config['interfaces'][$ifdescr]['ptpid'] == $ppp['ptpid'])
break;
}
}
$dev = $ppp['ports'];
- if ($config['interfaces'][$if]['ptpid'] != $ppp['ptpid'] || empty($dev))
+ if ($config['interfaces'][$ifdescr]['ptpid'] != $ppp['ptpid'] || empty($dev))
break;
if (file_exists($dev)) {
- if (file_exists("{$g['varrun_path']}/ppp_{$if}.pid")) {
- $ifinfo['pppinfo'] = "{$ifinfo['if']}";
+ if (file_exists("{$g['varrun_path']}/ppp_{$ifdescr}.pid")) {
+ $ifinfo['pppinfo'] = $ifinfo['if'];
$sec = trim(`/usr/local/sbin/ppp-uptime.sh {$ifinfo['if']}`);
$ifinfo['ppp_uptime'] = convert_seconds_to_hms($sec);
}
@@ -1341,8 +1341,8 @@ function get_interface_info($ifdescr) {
}
/* lookup the gateway */
- if (interface_has_gateway($if))
- $ifinfo['gateway'] = get_interface_gateway($if);
+ if (interface_has_gateway($ifdescr))
+ $ifinfo['gateway'] = get_interface_gateway($ifdescr);
}
$bridge = "";
diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php
index eaa968b..11b74fd 100755
--- a/usr/local/www/status_interfaces.php
+++ b/usr/local/www/status_interfaces.php
@@ -76,9 +76,7 @@ include("head.inc");
<?php endif; ?>
<tr>
<td colspan="2" class="listtopic">
- <?=htmlspecialchars($ifname);?>
- interface
- (<?=($ifinfo['hwif']);?>)
+ <?=htmlspecialchars($ifname);?> interface (<?=htmlspecialchars($ifinfo['hwif']);?>)
</td>
</tr>
<tr>
OpenPOWER on IntegriCloud