Actions
Bug #3637
closedIncorrect interface matching on bridge edit page
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