mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Validate vlan interface before delete it
This commit is contained in:
parent
eea7eb9984
commit
e9b6e032bc
@ -63,6 +63,8 @@ if ($_GET['act'] == "del") {
|
||||
/* check if still in use */
|
||||
if (vlan_inuse($_GET['id'])) {
|
||||
$input_errors[] = gettext("This VLAN cannot be deleted because it is still being used as an interface.");
|
||||
} elseif (!does_interface_exist($a_vlans[$_GET['id']]['vlanif'])) {
|
||||
$input_errors[] = gettext("Invalid VLAN interface.");
|
||||
} else {
|
||||
mwexec("/sbin/ifconfig " . $a_vlans[$_GET['id']]['vlanif'] . " destroy");
|
||||
unset($a_vlans[$_GET['id']]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user