summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-12-27 15:09:11 +0000
committerErmal <eri@pfsense.org>2010-12-27 15:09:11 +0000
commit6b78bed77784dd0fe823ba67019cfb899ed38f68 (patch)
treede15afca4dd214ddeea0c8fa6c8152dc7daf07a7 /usr/local/www
parent2b6561688fa269e0c50e8182a378f1d736ff2edf (diff)
downloadpfsense-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-xusr/local/www/interfaces_vlan_edit.php5
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.");
OpenPOWER on IntegriCloud