diff options
author | Ermal <eri@pfsense.org> | 2011-06-01 10:46:55 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-06-01 10:49:21 +0000 |
commit | 6b421a0fb42a50d1e87ac63c64a5b8b8d2157577 (patch) | |
tree | 205c6724f8314517057c9996f8b230ebe7dbc146 /usr/local/www/interfaces_vlan_edit.php | |
parent | 538b6eb353ce568627513e681483329ecb0d1ec8 (diff) | |
download | pfsense-6b421a0fb42a50d1e87ac63c64a5b8b8d2157577.zip pfsense-6b421a0fb42a50d1e87ac63c64a5b8b8d2157577.tar.gz |
Fixes #944. Use the correct interface name to destroy the previous vlan if the parent is changed.
Diffstat (limited to 'usr/local/www/interfaces_vlan_edit.php')
-rwxr-xr-x | usr/local/www/interfaces_vlan_edit.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php index 145fe0a..078fc3b 100755 --- a/usr/local/www/interfaces_vlan_edit.php +++ b/usr/local/www/interfaces_vlan_edit.php @@ -97,9 +97,13 @@ if ($_POST) { if (!$input_errors) { if (isset($id) && $a_vlans[$id]) { - if ($a_vlans[$id]['if'] != $_POST['if']) - // Destroy previous vlan - pfSense_interface_destroy($a_vlans[$id]['if']); + if ($a_vlans[$id]['if'] != $_POST['if']) { + if (!empty($a_vlans[$id]['vlanif'])) + // Destroy previous vlan + pfSense_interface_destroy($a_vlans[$id]['vlanif']); + else + pfSense_interface_destroy("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}"); + } } $vlan = array(); $vlan['if'] = $_POST['if']; |