mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix the check for whether the bridge is assigned.
This commit is contained in:
parent
01571da521
commit
3a669df20b
@ -46,12 +46,12 @@ if (!is_array($config['bridges']['bridged']))
|
||||
|
||||
$a_bridges = &$config['bridges']['bridged'] ;
|
||||
|
||||
function bridge_inuse($num) {
|
||||
function bridge_inuse($bridgeif) {
|
||||
global $config;
|
||||
|
||||
$iflist = get_configured_interface_list(false, true);
|
||||
foreach ($iflist as $if) {
|
||||
if ($config['interfaces'][$if]['if'] == $a_bridges[$num]['bridgeif'])
|
||||
if ($config['interfaces'][$if]['if'] == $bridgeif)
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ function bridge_inuse($num) {
|
||||
|
||||
if ($_GET['act'] == "del") {
|
||||
/* check if still in use */
|
||||
if (bridge_inuse($_GET['id'])) {
|
||||
if (bridge_inuse($a_bridges[$_GET['id']]['bridgeif'])) {
|
||||
$input_errors[] = "This bridge TUNNEL cannot be deleted because it is still being used as an interface.";
|
||||
} else {
|
||||
mwexec("/sbin/ifconfig " . $a_bridges[$_GET['id']]['bridgeif'] . " destroy");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user