Skip empty IPsec P1 during upgrade to 17.5. Fixes #9083

This commit is contained in:
jim-p 2018-10-31 12:59:03 -04:00
parent 5514e36842
commit 024e5de242

View File

@ -5489,9 +5489,13 @@ function upgrade_173_to_174() {
*/
function upgrade_174_to_175() {
global $config;
init_config_arr(array('ipsec', 'phase1'));
if (is_array($config['ipsec']['phase1'])) {
$a_phase1 = &$config['ipsec']['phase1'];
foreach($a_phase1 as &$phase1) {
if (empty($phase1)) {
continue;
}
$item = array();
$item['encryption-algorithm'] = $phase1['encryption-algorithm'];
$item['hash-algorithm'] = $phase1['hash-algorithm'];