Commit 8cabf4f0 authored by Franco Fichtner's avatar Franco Fichtner

ipsec: move deprecated disablevpnrules to its only user

(cherry picked from commit 83e21691)
parent dc0edff2
...@@ -66,7 +66,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -66,7 +66,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['enablebinatreflection'] = !empty($config['system']['enablebinatreflection']); $pconfig['enablebinatreflection'] = !empty($config['system']['enablebinatreflection']);
$pconfig['enablenatreflectionhelper'] = isset($config['system']['enablenatreflectionhelper']) ? $config['system']['enablenatreflectionhelper'] : null; $pconfig['enablenatreflectionhelper'] = isset($config['system']['enablenatreflectionhelper']) ? $config['system']['enablenatreflectionhelper'] : null;
$pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']); $pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']);
$pconfig['disablevpnrules'] = isset($config['system']['disablevpnrules']);
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') { } elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
$pconfig = $_POST; $pconfig = $_POST;
$old_aliasesresolveinterval = $config['system']['aliasesresolveinterval']; $old_aliasesresolveinterval = $config['system']['aliasesresolveinterval'];
...@@ -117,12 +116,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -117,12 +116,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
unset($config['system']['disablefilter']); unset($config['system']['disablefilter']);
} }
if (!empty($pconfig['disablevpnrules'])) {
$config['system']['disablevpnrules'] = true;
} elseif (isset($config['system']['disablevpnrules'])) {
unset($config['system']['disablevpnrules']);
}
if (!empty($pconfig['adaptiveend'])) { if (!empty($pconfig['adaptiveend'])) {
$config['system']['adaptiveend'] = $pconfig['adaptiveend']; $config['system']['adaptiveend'] = $pconfig['adaptiveend'];
} elseif (isset($config['system']['adaptiveend'])) { } elseif (isset($config['system']['adaptiveend'])) {
...@@ -519,16 +512,6 @@ include("head.inc"); ...@@ -519,16 +512,6 @@ include("head.inc");
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td><a id="help_for_disablevpnrules" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Disable Auto-added VPN rules') ?></td>
<td>
<input name="disablevpnrules" type="checkbox" value="yes" <?=!empty($pconfig['disablevpnrules']) ? "checked=\"checked\"" :"";?> />
<strong><?=gettext("Disable all auto-added VPN rules.");?></strong>
<div class="hidden" for="help_for_disablevpnrules">
<?=gettext("Note: This disables automatically added rules for IPsec, PPTP.");?>
</div>
</td>
</tr>
<tr> <tr>
<td><a id="help_for_disablereplyto" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Disable reply-to') ?></td> <td><a id="help_for_disablereplyto" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Disable reply-to') ?></td>
<td> <td>
......
...@@ -41,6 +41,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -41,6 +41,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// fetch form data // fetch form data
$pconfig = array(); $pconfig = array();
$pconfig['noinstalllanspd'] = isset($config['system']['noinstalllanspd']); $pconfig['noinstalllanspd'] = isset($config['system']['noinstalllanspd']);
$pconfig['disablevpnrules'] = isset($config['system']['disablevpnrules']);
$pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']); $pconfig['preferoldsa_enable'] = isset($config['ipsec']['preferoldsa']);
foreach ($ipsec_loglevels as $lkey => $ldescr) { foreach ($ipsec_loglevels as $lkey => $ldescr) {
if (!empty($config['ipsec']["ipsec_{$lkey}"])) { if (!empty($config['ipsec']["ipsec_{$lkey}"])) {
...@@ -57,6 +58,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -57,6 +58,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} elseif (isset($config['system']['noinstalllanspd'])) { } elseif (isset($config['system']['noinstalllanspd'])) {
unset($config['system']['noinstalllanspd']); unset($config['system']['noinstalllanspd']);
} }
if (!empty($pconfig['disablevpnrules'])) {
$config['system']['disablevpnrules'] = true;
} elseif (isset($config['system']['disablevpnrules'])) {
unset($config['system']['disablevpnrules']);
}
if (isset($pconfig['preferoldsa_enable']) && $pconfig['preferoldsa_enable'] == "yes") { if (isset($pconfig['preferoldsa_enable']) && $pconfig['preferoldsa_enable'] == "yes") {
$config['ipsec']['preferoldsa'] = true; $config['ipsec']['preferoldsa'] = true;
} elseif (isset($config['ipsec']['preferoldsa'])) { } elseif (isset($config['ipsec']['preferoldsa'])) {
...@@ -123,6 +129,13 @@ if (isset($input_errors) && count($input_errors) > 0) { ...@@ -123,6 +129,13 @@ if (isset($input_errors) && count($input_errors) > 0) {
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext('Disable Auto-added VPN rules') ?></td>
<td>
<input name="disablevpnrules" type="checkbox" value="yes" <?=!empty($pconfig['disablevpnrules']) ? "checked=\"checked\"" :"";?> />
<strong><?=gettext("Disable all auto-added VPN rules.");?></strong>
</td>
</tr>
<tr> <tr>
<td><a id="help_for_preferoldsa_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Security Associations"); ?></td> <td><a id="help_for_preferoldsa_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Security Associations"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment