summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-07-22 13:22:22 -0500
committerChris Buechler <cmb@pfsense.org>2015-07-22 13:22:22 -0500
commit3453cbfc6cb762b28d4bae8fe954570558dd7f35 (patch)
tree2ba4272ab45dc0239b35164c02e7fd1a8017ca1f /usr/local
parent14ec7c4bf878e94334f00cdf47873b6396d1b0da (diff)
parenta607968ab4fbfc5fa3baf6ce6282065e22b81847 (diff)
downloadpfsense-3453cbfc6cb762b28d4bae8fe954570558dd7f35.zip
pfsense-3453cbfc6cb762b28d4bae8fe954570558dd7f35.tar.gz
Merge pull request #1777 from phil-davis/patch-1
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/vpn_ipsec_settings.php28
1 files changed, 16 insertions, 12 deletions
diff --git a/usr/local/www/vpn_ipsec_settings.php b/usr/local/www/vpn_ipsec_settings.php
index f77135b..8b31f57 100644
--- a/usr/local/www/vpn_ipsec_settings.php
+++ b/usr/local/www/vpn_ipsec_settings.php
@@ -120,15 +120,13 @@ if ($_POST) {
if (!$input_errors) {
- if (is_array($config['ipsec'])) {
- foreach ($ipsec_loglevels as $lkey => $ldescr) {
- if (empty($_POST["ipsec_{$lkey}"])) {
- if (isset($config['ipsec']["ipsec_{$lkey}"])) {
- unset($config['ipsec']["ipsec_{$lkey}"]);
- }
- } else {
- $config['ipsec']["ipsec_{$lkey}"] = $_POST["ipsec_{$lkey}"];
+ foreach ($ipsec_loglevels as $lkey => $ldescr) {
+ if (empty($_POST["ipsec_{$lkey}"])) {
+ if (isset($config['ipsec']["ipsec_{$lkey}"])) {
+ unset($config['ipsec']["ipsec_{$lkey}"]);
}
+ } else {
+ $config['ipsec']["ipsec_{$lkey}"] = $_POST["ipsec_{$lkey}"];
}
}
@@ -171,7 +169,9 @@ if ($_POST) {
}
if ($_POST['noshuntlaninterfaces'] == "yes") {
- unset($config['ipsec']['noshuntlaninterfaces']);
+ if (isset($config['ipsec']['noshuntlaninterfaces'])) {
+ unset($config['ipsec']['noshuntlaninterfaces']);
+ }
} else {
$config['ipsec']['noshuntlaninterfaces'] = true;
}
@@ -188,7 +188,7 @@ if ($_POST) {
if (!empty($_POST['uniqueids'])) {
$config['ipsec']['uniqueids'] = $_POST['uniqueids'];
- } else {
+ } else if (isset($config['ipsec']['uniqueids'])) {
unset($config['ipsec']['uniqueids']);
}
@@ -196,8 +196,12 @@ if ($_POST) {
$config['system']['maxmss_enable'] = true;
$config['system']['maxmss'] = $_POST['maxmss'];
} else {
- unset($config['system']['maxmss_enable']);
- unset($config['system']['maxmss']);
+ if (isset($config['system']['maxmss_enable'])) {
+ unset($config['system']['maxmss_enable']);
+ }
+ if (isset($config['system']['maxmss'])) {
+ unset($config['system']['maxmss']);
+ }
}
write_config();
OpenPOWER on IntegriCloud