summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_ipsec.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-04-22 09:21:01 +0000
committerErmal Luçi <eri@pfsense.org>2009-04-22 09:21:26 +0000
commit04b46591f61a41171aa3bbd01c426ef4bcd5c3f5 (patch)
tree8e883745c1a1e047beb99338fbeb49f1170b84b8 /usr/local/www/vpn_ipsec.php
parent924876a80f9ac94a0e7b59b381312d0ffd186755 (diff)
downloadpfsense-04b46591f61a41171aa3bbd01c426ef4bcd5c3f5.zip
pfsense-04b46591f61a41171aa3bbd01c426ef4bcd5c3f5.tar.gz
* Do not apply the settings directly from hitting the SAVE button show the apply settings option for consistency with other pages.
Diffstat (limited to 'usr/local/www/vpn_ipsec.php')
-rwxr-xr-xusr/local/www/vpn_ipsec.php18
1 files changed, 4 insertions, 14 deletions
diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php
index d43f457..85094ec 100755
--- a/usr/local/www/vpn_ipsec.php
+++ b/usr/local/www/vpn_ipsec.php
@@ -56,8 +56,12 @@ if ($_POST) {
if ($_POST['apply']) {
$retval = 0;
+ config_lock();
$retval = vpn_ipsec_refresh_policies();
$retval = vpn_ipsec_configure();
+ config_unlock();
+ /* reload the filter in the background */
+ filter_configure();
$savemsg = get_std_save_message($retval);
if ($retval == 0) {
if (file_exists($d_ipsecconfdirty_path))
@@ -69,20 +73,6 @@ if ($_POST) {
$config['ipsec']['enable'] = $_POST['enable'] ? true : false;
write_config();
-
- $retval = 0;
- config_lock();
- $retval = vpn_ipsec_refresh_policies();
- $retval = vpn_ipsec_configure();
- config_unlock();
- /* reload the filter in the background */
- filter_configure();
-
- $savemsg = get_std_save_message($retval);
- if ($retval == 0) {
- if (file_exists($d_ipsecconfdirty_path))
- unlink($d_ipsecconfdirty_path);
- }
}
}
OpenPOWER on IntegriCloud