summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_advanced_misc.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-09-22 10:07:15 -0400
committerjim-p <jimp@pfsense.org>2010-09-22 10:07:15 -0400
commit7b2fdac49b28d638a38c9f51a7222e25d386bcca (patch)
treed3167ad755b748c0632995a6c3190dd71d4429a1 /usr/local/www/system_advanced_misc.php
parent838feb14e175b8132e9d9c0c5ca8adfc9d187837 (diff)
downloadpfsense-7b2fdac49b28d638a38c9f51a7222e25d386bcca.zip
pfsense-7b2fdac49b28d638a38c9f51a7222e25d386bcca.tar.gz
Properly check and set "Prefer older IPsec SAs" setting in the config and its associated sysctl. Move setting the sysctl to its own function to avoid code duplication.
Diffstat (limited to 'usr/local/www/system_advanced_misc.php')
-rw-r--r--usr/local/www/system_advanced_misc.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/system_advanced_misc.php b/usr/local/www/system_advanced_misc.php
index e17f775..8ca3884 100644
--- a/usr/local/www/system_advanced_misc.php
+++ b/usr/local/www/system_advanced_misc.php
@@ -47,6 +47,7 @@ require("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
+require_once("vpn.inc");
$pconfig['harddiskstandby'] = $config['system']['harddiskstandby'];
$pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']);
@@ -79,9 +80,9 @@ if ($_POST) {
unset($config['system']['lb_use_sticky']);
if($_POST['preferoldsa_enable'] == "yes")
- $config['system']['preferoldsa'] = true;
- else
- unset($config['system']['preferoldsa']);
+ $config['ipsec']['preferoldsa'] = true;
+ else
+ unset($config['ipsec']['preferoldsa']);
if($_POST['maxmss_enable'] == "yes") {
$config['system']['maxmss_enable'] = true;
@@ -117,6 +118,7 @@ if ($_POST) {
activate_powerd();
load_glxsb();
+ vpn_ipsec_configure_preferoldsa();
}
}
@@ -242,7 +244,7 @@ function maxmss_checked(obj) {
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Security Assocications"); ?></td>
<td width="78%" class="vtable">
- <input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if (isset($pconfig['preferoldsa_enable'])) echo "checked"; ?> />
+ <input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?php if ($pconfig['preferoldsa_enable']) echo "checked"; ?> />
<strong><?=gettext("Prefer older IPsec SAs"); ?></strong>
<br />
<?=gettext("By default, if several SAs match, the newest one is " .
OpenPOWER on IntegriCloud