Skip to content

Commit

Permalink
Skip empty IPsec P1 during upgrade to 17.5. Fixes #9083
Browse files Browse the repository at this point in the history
(cherry picked from commit 024e5de)
  • Loading branch information
jim-p committed Oct 31, 2018
1 parent 087a1f6 commit 1f7ea9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/etc/inc/upgrade_config.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down

0 comments on commit 1f7ea9c

Please sign in to comment.