diff options
author | smos <seth.mos@dds.nl> | 2010-07-30 11:52:49 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2010-07-30 11:54:35 +0200 |
commit | d827f9ccaf568ddbc10b0338011e0906cf192e16 (patch) | |
tree | 51a8e20ce4e548721df757ce56a3c897d915eb01 /etc/inc/upgrade_config.inc | |
parent | 34525fefe1936d1bc12ffd1afd0a2428e5e80f7b (diff) | |
download | pfsense-d827f9ccaf568ddbc10b0338011e0906cf192e16.zip pfsense-d827f9ccaf568ddbc10b0338011e0906cf192e16.tar.gz |
Invert the is_array() check as this incorrectly unsets the gateway array leaving the system unreachable
Diffstat (limited to 'etc/inc/upgrade_config.inc')
-rw-r--r-- | etc/inc/upgrade_config.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index c0ccb8d..ff05542 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -1612,8 +1612,9 @@ function upgrade_053_to_054() { $lbpool_srv_arr = array(); $gateway_group_arr = array(); $gateways = return_gateways_array(); - if (is_array($config['gateways']['gateway_item'])) + if (! is_array($config['gateways']['gateway_item'])) $config['gateways']['gateway_item'] = array(); + $a_gateways =& $config['gateways']['gateway_item']; foreach($lbpool_arr as $lbpool) { if($lbpool['type'] == "gateway") { @@ -1630,10 +1631,11 @@ function upgrade_053_to_054() { $static_name = "GW_" . strtoupper($interface); if(is_ipaddr($monitor)) { $interface = $static_name; - if(is_array($gateways[$static_name]) && isset($gateways[$static_name]['attribute'])) + if(is_array($gateways[$static_name]) && isset($gateways[$static_name]['attribute'])) { $a_gateways[$gateways[$static_name]['attribute']]['monitor'] = $monitor; - else + } else { $config['interfaces'][$interface]['monitorip'] = $monitor; + } } /* on failover increment tier. Else always assign 1 */ if($lbpool['behaviour'] == "failover") { |