summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_vlan.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/interfaces_vlan.php')
-rwxr-xr-xusr/local/www/interfaces_vlan.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr/local/www/interfaces_vlan.php b/usr/local/www/interfaces_vlan.php
index f4836f2..7639c0f 100755
--- a/usr/local/www/interfaces_vlan.php
+++ b/usr/local/www/interfaces_vlan.php
@@ -67,10 +67,9 @@ if ($_GET['act'] == "del") {
/* check if still in use */
else 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");
+ if (does_interface_exist($a_vlans[$_GET['id']]['vlanif']))
+ pfSense_interface_destroy($a_vlans[$_GET['id']]['vlanif']);
unset($a_vlans[$_GET['id']]);
write_config();
OpenPOWER on IntegriCloud