diff options
author | Renato Botelho <renato@netgate.com> | 2015-07-17 09:51:15 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-07-17 09:51:15 -0300 |
commit | e4b7410b9bc3622cee6797588a7d5a685d4d759e (patch) | |
tree | d0d74ed8f278aaa4cd207650ad9d2b6ea1023178 | |
parent | d6908784eefb646d925cf259be9bec876b213440 (diff) | |
download | pfsense-e4b7410b9bc3622cee6797588a7d5a685d4d759e.zip pfsense-e4b7410b9bc3622cee6797588a7d5a685d4d759e.tar.gz |
Fix #4794:
- Add a upgrade code to fix asn1dn string format to match strongSwan needs
- Bump config version to 11.8
-rw-r--r-- | conf.default/config.xml | 2 | ||||
-rw-r--r-- | etc/inc/globals.inc | 2 | ||||
-rw-r--r-- | etc/inc/upgrade_config.inc | 21 |
3 files changed, 23 insertions, 2 deletions
diff --git a/conf.default/config.xml b/conf.default/config.xml index 46afa50..6a6da59 100644 --- a/conf.default/config.xml +++ b/conf.default/config.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <pfsense> - <version>11.7</version> + <version>11.8</version> <lastchange/> <theme>pfsense_ng</theme> <system> diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 6cf1150..7a8a09a 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -74,7 +74,7 @@ $g = array( "disablecrashreporter" => false, "crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php", "debug" => false, - "latest_config" => "11.7", + "latest_config" => "11.8", "nopkg_platforms" => array("cdrom"), "minimum_ram_warning" => "101", "minimum_ram_warning_text" => "128 MB", diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 96f0325..a60b966 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -3566,4 +3566,25 @@ function upgrade_116_to_117() { } +function upgrade_117_to_118() { + global $config; + + if (!isset($config['ipsec']['phase1'])) { + return; + } + + $a_phase1 =& $config['ipsec']['phase1']; + + foreach ($a_phase1 as &$ph1_entry) { + 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']); + } + if (isset($ph1_entry['peerid_type']) && $ph1_entry['peerid_type'] == 'asn1dn') { + $ph1_entry['peerid_data'] = + preg_replace('/\/\s*emailAddress\s*=\s*/', ', E=', $ph1_entry['peerid_data']); + } + } +} + ?> |