diff options
author | Seth Mos <seth.mos@xs4all.nl> | 2009-06-08 14:39:08 +0200 |
---|---|---|
committer | Seth Mos <seth.mos@xs4all.nl> | 2009-06-08 14:39:08 +0200 |
commit | dbaa0e34026593632dad86fe310f7c797da3a79f (patch) | |
tree | 98c5112c7ff87649dad868909a0776c2b45f32a3 /etc/inc/upgrade_config.inc | |
parent | fcf5afa07b15d6fcd8368b13a2840e3a71db5315 (diff) | |
download | pfsense-dbaa0e34026593632dad86fe310f7c797da3a79f.zip pfsense-dbaa0e34026593632dad86fe310f7c797da3a79f.tar.gz |
Fix VLAN upgrade code properly. That's what I get for blind coding.
Testing bridging code now
Diffstat (limited to 'etc/inc/upgrade_config.inc')
-rw-r--r-- | etc/inc/upgrade_config.inc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 472bfdc..1df3e8c 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -589,7 +589,7 @@ function upgrade_037_to_038() { /* This should only be valid when upgrading bridges from a 1.2 config */ $a_bridges = array(); $counter = 0; - foreach($config['interfaces'] as $interface => $name) { + foreach($config['interfaces'] as $name => $interface ) { if($interface['bridge'] <> "") { $bridge = array(); $bridge['members'] = "{$name},{$interface['bridge']}"; @@ -620,15 +620,12 @@ function upgrade_038_to_039() { /* This should only be valid when upgrading vlans from a 1.2 config though */ /* Vlan upgrade code. Since we now create vlans with a vlanif tag we just start at 0 */ - $a_vlans = array(); $vlan_counter = 0; - if (is_array($config['vlans'])) { - foreach ($config['vlans'] as $vlan) { - $a_vlans[$vlan_counter] = $vlan; - $a_vlans[$vlan_counter]['vlanif'] = "vlan{$vlan_counter}"; + if (is_array($config['vlans']['vlan'])) { + foreach ($config['vlans']['vlan'] as $vlan) { + $config['vlans']['vlan'][$vlan_counter]['vlanif'] = "vlan{$vlan_counter}"; $vlan_counter++; } - $config['vlans'] = $a_vlans; } } |