diff options
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."); |