summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-07-25 16:34:12 +0000
committerErmal Luçi <eri@pfsense.org>2008-07-25 16:34:12 +0000
commit38738505fec47e0b925335c44ce239420ea884ec (patch)
tree261343119edbaf49b4716aed1904a027228691d4
parent468c6fb8c6f228b9c4b6de06f4349a28d53ac1ce (diff)
downloadpfsense-38738505fec47e0b925335c44ce239420ea884ec.zip
pfsense-38738505fec47e0b925335c44ce239420ea884ec.tar.gz
Provide good looking entries for GRE/GIF/BRIDGES.
NOTE: that for now becareful to assing this cloners after their parents for GRE/GIF and after their members for BRIDGE to avoid problems.
-rwxr-xr-xusr/local/www/interfaces_assign.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php
index 289d071..c0292d4 100755
--- a/usr/local/www/interfaces_assign.php
+++ b/usr/local/www/interfaces_assign.php
@@ -48,6 +48,30 @@ if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) {
}
}
+/* add Bridge interfaces */
+if (is_array($config['bridges']['bridge']) && count($config['bridges']['bridge'])) {
+ foreach ($config['bridges']['bridge'] as $bridge) {
+ $portlist[$bridge['bridgeif']] = $bridge;
+ $portlist[$bridge['bridgeif']]['isbridge'] = true;
+ }
+}
+
+/* add GIF interfaces */
+if (is_array($config['gifs']['gif']) && count($config['gifs']['gif'])) {
+ foreach ($config['gifs']['gif'] as $gif) {
+ $portlist[$gif['gifif']] = $gif;
+ $portlist[$gif['gifif']]['isgif'] = true;
+ }
+}
+
+/* add GRE interfaces */
+if (is_array($config['gres']['gre']) && count($config['gres']['gre'])) {
+ foreach ($config['gres']['gre'] as $gre) {
+ $portlist[$gre['greif']] = $gre;
+ $portlist[$gre['greif']]['isgre'] = true;
+ }
+}
+
/* add PPP interfaces */
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
$i = 0;
@@ -307,6 +331,21 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed"))
if ($portinfo['descr'])
$descr .= " (" . $portinfo['descr'] . ")";
echo htmlspecialchars($descr);
+ } elseif ($portinfo['isbridge']) {
+ $descr = strtoupper($portinfo['bridgeif']);
+ if ($portinfo['descr'])
+ $descr .= " (" . $portinfo['descr'] . ")";
+ echo htmlspecialchars($descr);
+ } elseif ($portinfo['isgre']) {
+ $descr = "GRE {$portinfo['remote-addr']}";
+ if ($portinfo['descr'])
+ $descr .= " (" . $portinfo['descr'] . ")";
+ echo htmlspecialchars($descr);
+ } elseif ($portinfo['isgif']) {
+ $descr = "GRE {$portinfo['remote-addr']}";
+ if ($portinfo['descr'])
+ $descr .= " (" . $portinfo['descr'] . ")";
+ echo htmlspecialchars($descr);
} else
echo htmlspecialchars($portname . " (" . $portinfo['mac'] . ")");
?>
OpenPOWER on IntegriCloud