From b0d6223f89007156e93fa6bb76fe92f9300b11b3 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 27 Jun 2011 19:01:43 +0000 Subject: When editing a vlan and chaning its tag id and the vlan is assigned correct even the interface name of the assignment otherwise we result in breaking the install. --- usr/local/www/interfaces_vlan_edit.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'usr/local/www/interfaces_vlan_edit.php') diff --git a/usr/local/www/interfaces_vlan_edit.php b/usr/local/www/interfaces_vlan_edit.php index 08f1a53..b6cea47 100755 --- a/usr/local/www/interfaces_vlan_edit.php +++ b/usr/local/www/interfaces_vlan_edit.php @@ -98,11 +98,16 @@ if ($_POST) { if (!$input_errors) { if (isset($id) && $a_vlans[$id]) { if (($a_vlans[$id]['if'] != $_POST['if']) || ($a_vlans[$id]['tag'] != $_POST['tag'])) { - if (!empty($a_vlans[$id]['vlanif'])) + if (!empty($a_vlans[$id]['vlanif'])) { + $confif = convert_real_interface_to_friendly_interface_name($vlan['vlanif']); // Destroy previous vlan pfSense_interface_destroy($a_vlans[$id]['vlanif']); - else + } else { pfSense_interface_destroy("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}"); + $confif = convert_real_interface_to_friendly_interface_name("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}"); + } + if ($confif <> "") + $config['interfaces'][$confif]['if'] = "{$_POST['if']}_vlan{$_POST['tag']}"; } } $vlan = array(); @@ -122,7 +127,6 @@ if ($_POST) { write_config(); - $confif = convert_real_interface_to_friendly_interface_name($vlan['vlanif']); if ($confif <> "") interface_configure($confif); -- cgit v1.1