summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_ipsec_settings.php
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-31 11:06:44 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-31 11:06:44 +0100
commit420fce0458f4f1b49faa167a1b6ccc7800d2b8a3 (patch)
treecc4c03655c011105af1759fa7cf2892a60165e83 /usr/local/www/vpn_ipsec_settings.php
parent430379acf9e4bfcda2625954700a6184265c8f73 (diff)
downloadpfsense-420fce0458f4f1b49faa167a1b6ccc7800d2b8a3.zip
pfsense-420fce0458f4f1b49faa167a1b6ccc7800d2b8a3.tar.gz
Fixes #4353 Identify when strongswan.conf needs a reload and restart ipsec service.
Diffstat (limited to 'usr/local/www/vpn_ipsec_settings.php')
-rw-r--r--usr/local/www/vpn_ipsec_settings.php28
1 files changed, 21 insertions, 7 deletions
diff --git a/usr/local/www/vpn_ipsec_settings.php b/usr/local/www/vpn_ipsec_settings.php
index 9de5a26..fa9ae0b 100644
--- a/usr/local/www/vpn_ipsec_settings.php
+++ b/usr/local/www/vpn_ipsec_settings.php
@@ -130,20 +130,34 @@ if ($_POST) {
}
}
- if($_POST['compression'] == "yes")
+ $needsrestart = false;
+
+ if($_POST['compression'] == "yes") {
+ if (!isset($config['ipsec']['compression']))
+ $needsrestart = true;
$config['ipsec']['compression'] = true;
- elseif (isset($config['ipsec']['compression']))
+ } elseif (isset($config['ipsec']['compression'])) {
+ $needsrestart = true;
unset($config['ipsec']['compression']);
+ }
- if($_POST['unityplugin'] == "yes")
+ if($_POST['unityplugin'] == "yes") {
+ if (!isset($config['ipsec']['unityplugin']))
+ $needsrestart = true;
$config['ipsec']['unityplugin'] = true;
- elseif (isset($config['ipsec']['unityplugin']))
+ } elseif (isset($config['ipsec']['unityplugin'])) {
+ $needsrestart = true;
unset($config['ipsec']['unityplugin']);
+ }
- if($_POST['acceptunencryptedmainmode'] == "yes")
+ if($_POST['acceptunencryptedmainmode'] == "yes") {
+ if (!isset($config['ipsec']['acceptunencryptedmainmode']))
+ $needsrestart = true;
$config['ipsec']['acceptunencryptedmainmode'] = true;
- elseif (isset($config['ipsec']['acceptunencryptedmainmode']))
+ } elseif (isset($config['ipsec']['acceptunencryptedmainmode'])) {
+ $needsrestart = true;
unset($config['ipsec']['acceptunencryptedmainmode']);
+ }
if($_POST['maxmss_enable'] == "yes") {
$config['system']['maxmss_enable'] = true;
@@ -163,7 +177,7 @@ if ($_POST) {
$savemsg = gettext($retval);
vpn_ipsec_configure_preferoldsa();
- vpn_ipsec_configure();
+ vpn_ipsec_configure($needsrestart);
vpn_ipsec_configure_loglevels();
// header("Location: vpn_ipsec_settings.php");
OpenPOWER on IntegriCloud