diff options
author | Ermal <eri@pfsense.org> | 2010-12-27 15:09:11 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-12-27 15:09:11 +0000 |
commit | 6b78bed77784dd0fe823ba67019cfb899ed38f68 (patch) | |
tree | de15afca4dd214ddeea0c8fa6c8152dc7daf07a7 /usr/local/www | |
parent | 2b6561688fa269e0c50e8182a378f1d736ff2edf (diff) | |
download | pfsense-6b78bed77784dd0fe823ba67019cfb899ed38f68.zip pfsense-6b78bed77784dd0fe823ba67019cfb899ed38f68.tar.gz |
Ticket #944. Wehn changing the parent interface make sure to destroy the old vlan before creating the new one. Since vlans use the name of the parent the old interface referencing the old parent vlan will remain intact.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/interfaces_vlan_edit.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php index 447722a..f548386 100755 --- a/usr/local/www/interfaces_vlan_edit.php +++ b/usr/local/www/interfaces_vlan_edit.php @@ -102,6 +102,11 @@ if ($_POST) { $vlan['descr'] = $_POST['descr']; $vlan['vlanif'] = "{$_POST['if']}_vlan{$_POST['tag']}"; + if (isset($id) && $a_vlans[$id]) { + if ($a_vlans[$id]['if'] != $_POST['if']) + // Destroy previous vlan + interface_bring_down($a_vlans[$id]['if'], true); + } $vlan['vlanif'] = interface_vlan_configure($vlan); if ($vlan['vlanif'] == "" || !stristr($vlan['vlanif'], "vlan")) $input_errors[] = gettext("Error occured creating interface, please retry."); |