summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_vlan.php
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-10-18 17:41:32 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-10-18 17:41:32 -0300
commit36b7f215449c027992858f324917a6ad4611e73b (patch)
tree056d91ad7842d5686638e2fc8163de8061231968 /usr/local/www/interfaces_vlan.php
parent40a8f669c2dbdc70a53009b97597b1982a5f5d65 (diff)
downloadpfsense-36b7f215449c027992858f324917a6ad4611e73b.zip
pfsense-36b7f215449c027992858f324917a6ad4611e73b.tar.gz
Fix #3273
- When you disable a interface, it destroys vlan interface from system. Do not report error when interface doesn't exist. - While I'm here, use pfSense_interface_destroy() instead of ifconfig
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