Skip to content

Instantly share code, notes, and snippets.

@jim-p
Created April 2, 2015 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jim-p/74e9bb06793d535cb2fe to your computer and use it in GitHub Desktop.
Save jim-p/74e9bb06793d535cb2fe to your computer and use it in GitHub Desktop.
ipsec-unqiueids-fix-2.2.1.patch
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 4d242e6..fc4bce5 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -575,7 +575,7 @@ EOD;
$uniqueids = 'yes';
if (!empty($config['ipsec']['uniqueids'])) {
- if (in_array($uniqueids, $ipsec_idhandling))
+ if (array_key_exists($config['ipsec']['uniqueids'], $ipsec_idhandling))
$uniqueids = $config['ipsec']['uniqueids'];
}
$natfilterrules = false;
diff --git a/usr/local/www/vpn_ipsec_settings.php b/usr/local/www/vpn_ipsec_settings.php
index 6f49c78..41d6a3a 100644
--- a/usr/local/www/vpn_ipsec_settings.php
+++ b/usr/local/www/vpn_ipsec_settings.php
@@ -51,6 +51,7 @@ $pconfig['enableinterfacesuse'] = isset($config['ipsec']['enableinterfacesuse'])
$pconfig['acceptunencryptedmainmode'] = isset($config['ipsec']['acceptunencryptedmainmode']);
$pconfig['maxmss_enable'] = isset($config['system']['maxmss_enable']);
$pconfig['maxmss'] = $config['system']['maxmss'];
+$pconfig['uniqueids'] = $config['ipsec']['uniqueids'];
if ($_POST) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment