summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_lan.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-06-21 17:13:18 +0000
committerErmal Luçi <eri@pfsense.org>2008-06-21 17:13:18 +0000
commitfbb45bb034aad683b2bd207a497d0cfc0b1b5a1e (patch)
treec3ca0e3af16571da1d6f07059b72465bce5f97d3 /usr/local/www/interfaces_lan.php
parentb73911250669f091119a237ebad5078fdb130ff2 (diff)
downloadpfsense-fbb45bb034aad683b2bd207a497d0cfc0b1b5a1e.zip
pfsense-fbb45bb034aad683b2bd207a497d0cfc0b1b5a1e.tar.gz
Continue interface improvements
Diffstat (limited to 'usr/local/www/interfaces_lan.php')
-rwxr-xr-xusr/local/www/interfaces_lan.php28
1 files changed, 13 insertions, 15 deletions
diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php
index ad2867d..9cbb04e 100755
--- a/usr/local/www/interfaces_lan.php
+++ b/usr/local/www/interfaces_lan.php
@@ -50,15 +50,16 @@ if ($_POST) {
if ($_POST['bridge']) {
/* double bridging? */
- for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
- if ($i != $index) {
- if ($config['interfaces']['opt' . $i]['bridge'] == $_POST['bridge']) {
- //$input_errors[] = "Optional interface {$i} " .
- // "({$config['interfaces']['opt' . $i]['descr']}) is already bridged to " .
+ $iflist = get_configured_interface_list(true, true);
+ foreach ($iflist as $if) {
+ if ($if != $index) { /* XXX: totaly bogus */
+ if ($config['interfaces'][$if]['bridge'] == $_POST['bridge']) {
+ //$input_errors[] = "Optional interface {$if} " .
+ // "({$config['interfaces'][$if]['descr']}) is already bridged to " .
// "the specified interface.";
- } else if ($config['interfaces']['opt' . $i]['bridge'] == "opt{$index}") {
- //$input_errors[] = "Optional interface {$i} " .
- // "({$config['interfaces']['opt' . $i]['descr']}) is already bridged to " .
+ } else if ($config['interfaces'][$if]['bridge'] == $if) {
+ //$input_errors[] = "Optional interface {$if} " .
+ // "({$config['interfaces'][$if]['descr']}) is already bridged to " .
// "this interface.";
}
}
@@ -174,13 +175,10 @@ function enable_change(enable_over) {
<td width="78%" class="vtable">
<select name="bridge" class="formselect" id="bridge" onChange="enable_change(false)">
<option <?php if (!$pconfig['bridge']) echo "selected";?> value="">none</option>
- <?php $opts = array('wan' => "WAN");
- for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
- if ($i != $index)
- $opts['opt' . $i] = "Optional " . $i . " (" .
- $config['interfaces']['opt' . $i]['descr'] . ")";
- }
- foreach ($opts as $opt => $optname): ?>
+ <?php
+ $opts = get_configured_interface_with_descr();
+ foreach ($opts as $opt => $optname):
+ if ($opt == "lan") continue;?>
<option <?php if ($opt == $pconfig['bridge']) echo "selected";?> value="<?=htmlspecialchars($opt);?>">
<?=htmlspecialchars($optname);?>
</option>
OpenPOWER on IntegriCloud