mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Don't refuse to delete a bridge in the GUI just because its bridge interface doesn't exist, just log that it doesn't exist and don't attempt to ifconfig destroy it, delete it from config
This commit is contained in:
parent
67273d727b
commit
549b7ce250
@ -66,10 +66,13 @@ if ($_GET['act'] == "del") {
|
||||
/* check if still in use */
|
||||
else if (bridge_inuse($_GET['id'])) {
|
||||
$input_errors[] = gettext("This bridge cannot be deleted because it is assigned as an interface.");
|
||||
} elseif (!does_interface_exist($a_bridges[$_GET['id']]['bridgeif'])) {
|
||||
$input_errors[] = gettext("Invalid bridge interface.");
|
||||
} else {
|
||||
mwexec("/sbin/ifconfig " . $a_bridges[$_GET['id']]['bridgeif'] . " destroy");
|
||||
if (!does_interface_exist($a_bridges[$_GET['id']]['bridgeif'])) {
|
||||
log_error("Bridge interface does not exist, skipping ifconfig destroy.");
|
||||
} else {
|
||||
mwexec("/sbin/ifconfig " . $a_bridges[$_GET['id']]['bridgeif'] . " destroy");
|
||||
}
|
||||
|
||||
unset($a_bridges[$_GET['id']]);
|
||||
|
||||
write_config();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user