Project

General

Profile

Actions

Bug #3637

closed

Incorrect interface matching on bridge edit page

Added by Peter O almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
Interfaces
Target version:
Start date:
05/05/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:

Description

At line 276 of interfaces_bridge_edit.php, the comparison whether the interface is a bridge member or not is kind of flawed. With config as displayed, interface opt10 is confused with opt1.


$ifacelist = array(18) {
  ["wan"]=>
  string(3) "WAN" 
  ["lan"]=>
  string(7) "STORAGE" 
  ["opt1"]=>
  string(4) "CARP" 
  ["opt2"]=>
  string(15) "LOCAL_SERVERS" 
  ["opt3"]=>
  string(16) "INTERNET_SERVERS" 
  ["opt4"]=>
  string(4) "CUST1" 
  ["opt5"]=>
  string(9) "VPS_CUST4" 
  ["opt6"]=>
  string(11) "VPS_CUST5" 
  ["opt7"]=>
  string(5) "VPS_3" 
  ["opt8"]=>
  string(5) "VPS_4" 
  ["opt9"]=>
  string(5) "VPS_5" 
  ["opt10"]=>
  string(16) "OPENVPN_CUST4_RW" 
  ["opt11"]=>
  string(18) "OPENVPN_CUST2_RW" 
  ["opt12"]=>
  string(10) "WAN_BRIDGE" 
  ["opt13"]=>
  string(3) "VSL" 
  ["opt14"]=>
  string(6) "CUST2" 
  ["opt15"]=>
  string(8) "VSL_ADSL" 
  ["opt42"]=>
  string(7) "CUST3" 
}

$pconfig['members'] = string(10) "opt5,opt10" 

<?php

foreach ($ifacelist as $ifn => $ifinfo) {
    echo "<option value=\"{$ifn}\"";
    if (stristr($pconfig['members'], $ifn))
        echo " selected=\"selected\"";
    echo ">{$ifinfo}</option>";
}

?>
Actions #1

Updated by Chris Buechler almost 10 years ago

  • Category set to Interfaces
  • Target version set to 2.2
  • Affected Version set to All
Actions #2

Updated by Renato Botelho almost 10 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #4

Updated by Peter O almost 10 years ago

Seems to be working correctly now

Actions #5

Updated by Renato Botelho almost 10 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF