Skip to content

Commit

Permalink
change iketype auto to ikev2 on upgrade. Ticket #4873
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Buechler committed Jul 23, 2015
1 parent 4d75684 commit bdd9efb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions etc/inc/upgrade_config.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3770,6 +3770,7 @@ function upgrade_117_to_118() {
$a_phase1 =& $config['ipsec']['phase1'];

foreach ($a_phase1 as &$ph1_entry) {
// update asn1dn strings from racoon's format to strongswan's
if (isset($ph1_entry['myid_type']) && $ph1_entry['myid_type'] == 'asn1dn') {
$ph1_entry['myid_data'] =
preg_replace('/\/\s*emailAddress\s*=\s*/', ', E=', $ph1_entry['myid_data']);
Expand All @@ -3778,6 +3779,10 @@ function upgrade_117_to_118() {
$ph1_entry['peerid_data'] =
preg_replace('/\/\s*emailAddress\s*=\s*/', ', E=', $ph1_entry['peerid_data']);
}
// iketype 'auto' was removed and is really v2, update accordingly
if ($ph1_entry['iketype'] == "auto") {
$ph1_entry['iketype'] = "ikev2";
}
}
}

Expand Down

0 comments on commit bdd9efb

Please sign in to comment.