diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-10-18 17:41:32 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-10-18 17:41:32 -0300 |
commit | 36b7f215449c027992858f324917a6ad4611e73b (patch) | |
tree | 056d91ad7842d5686638e2fc8163de8061231968 | |
parent | 40a8f669c2dbdc70a53009b97597b1982a5f5d65 (diff) | |
download | pfsense-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
-rwxr-xr-x | usr/local/www/interfaces_vlan.php | 5 |
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(); |