summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-09-03 23:12:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-09-03 23:12:42 +0000
commit0529547cf6c933f7bf6467fe0535f121931da7e9 (patch)
treed6a6a3c3b96fb650f4032c276ad3191ca9cb93ec /usr
parentf559eaf6ff242795c9b6bafffcd8f933f0b2ae3c (diff)
downloadpfsense-0529547cf6c933f7bf6467fe0535f121931da7e9.zip
pfsense-0529547cf6c933f7bf6467fe0535f121931da7e9.tar.gz
Add bridge status
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/status_interfaces.php29
1 files changed, 28 insertions, 1 deletions
diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php
index 7eac262..0496d3d 100755
--- a/usr/local/www/status_interfaces.php
+++ b/usr/local/www/status_interfaces.php
@@ -1,4 +1,3 @@
-#!/usr/local/bin/php
<?php
/* $Id$ */
/*
@@ -230,6 +229,24 @@ function get_interface_info($ifdescr) {
}
}
+ $bridge = "";
+ $int = "";
+ $int = convert_friendly_interface_to_real_interface_name($ifdescr);
+ $bridge = link_int_to_bridge_interface($int);
+ if($bridge) {
+ $bridge_text = `/sbin/ifconfig {$bridge}`;
+ if(stristr($bridge_text, "blocking") <> false) {
+ $ifinfo['bridge'] = "<b><font color='red'>blocking</font></b> - check for ethernet loops";
+ $ifinfo['bridgeint'] = $bridge;
+ } else if(stristr($bridge_text, "learning") <> false) {
+ $ifinfo['bridge'] = "learning";
+ $ifinfo['bridgeint'] = $bridge;
+ } else if(stristr($bridge_text, "forwarding") <> false) {
+ $ifinfo['bridge'] = "forwarding";
+ $ifinfo['bridgeint'] = $bridge;
+ }
+ }
+
return $ifinfo;
}
@@ -378,6 +395,16 @@ include("head.inc");
</td>
</tr><?php endif; ?>
<?php endif; ?>
+
+ <?php if ($ifinfo['bridge']): ?>
+ <tr>
+ <td width="22%" class="vncellt">Bridge (<?=$ifinfo['bridgeint']?>)</td>
+ <td width="78%" class="listr">
+ <?=$ifinfo['bridge'];?>
+ </td>
+ </tr>
+ <?php endif; ?>
+
<?php $i++; endforeach; ?>
</table>
<br/>
OpenPOWER on IntegriCloud