Commit 5ea45d86 authored by Ad Schellevis's avatar Ad Schellevis

(filter) remove nat+proxy, https://github.com/opnsense/core/issues/963

parent 8d0cb3c5
This diff is collapsed.
......@@ -312,7 +312,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$natent['associated-rule-id'] = "pass";
}
if ($pconfig['natreflection'] == "enable" || $pconfig['natreflection'] == "purenat" || $pconfig['natreflection'] == "disable") {
if ($pconfig['natreflection'] == "purenat" || $pconfig['natreflection'] == "disable") {
$natent['natreflection'] = $pconfig['natreflection'];
}
......@@ -968,7 +968,6 @@ $( document ).ready(function() {
<td>
<select name="natreflection" class="selectpicker">
<option value="default" <?=$pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "purenat" && $pconfig['natreflection'] != "disable" ? "selected=\"selected\"" : ""; ?>><?=gettext("Use system default"); ?></option>
<option value="enable" <?=$pconfig['natreflection'] == "enable" ? "selected=\"selected\"" : ""; ?>><?=gettext("Enable (NAT + Proxy)"); ?></option>
<option value="purenat" <?=$pconfig['natreflection'] == "purenat" ? "selected=\"selected\"" : ""; ?>><?=gettext("Enable (Pure NAT)"); ?></option>
<option value="disable" <?=$pconfig['natreflection'] == "disable" ? "selected=\"selected\"" : ""; ?>><?=gettext("Disable"); ?></option>
</select>
......
......@@ -61,9 +61,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['skip_rules_gw_down'] = isset($config['system']['skip_rules_gw_down']);
$pconfig['lb_use_sticky'] = isset($config['system']['lb_use_sticky']);
$pconfig['srctrack'] = !empty($config['system']['srctrack']) ? $config['system']['srctrack'] : null;
if (!isset($config['system']['disablenatreflection']) && !isset($config['system']['enablenatreflectionpurenat'])) {
$pconfig['natreflection'] = "proxy";
} elseif (isset($config['system']['enablenatreflectionpurenat'])) {
if (!isset($config['system']['disablenatreflection'])) {
$pconfig['natreflection'] = "purenat";
} else {
$pconfig['natreflection'] = "disable";
......@@ -162,17 +160,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
unset($config['system']['checkaliasesurlcert']);
}
if ($pconfig['natreflection'] == "proxy") {
if ($pconfig['natreflection'] == "purenat") {
if (isset($config['system']['disablenatreflection'])) {
unset($config['system']['disablenatreflection']);
unset($config['system']['enablenatreflectionpurenat']);
} elseif ($pconfig['natreflection'] == "purenat") {
unset($config['system']['disablenatreflection']);
$config['system']['enablenatreflectionpurenat'] = "yes";
}
} else {
$config['system']['disablenatreflection'] = "yes";
if (isset($config['system']['enablenatreflectionpurenat'])) {
unset($config['system']['enablenatreflectionpurenat']);
}
}
if (!empty($pconfig['enablebinatreflection'])) {
......@@ -305,9 +298,6 @@ include("head.inc");
<option value="disable" <?=$pconfig['natreflection'] == "disable" ? "selected=\"selected\"" : "";?>>
<?=gettext("Disable"); ?>
</option>
<option value="proxy" <?=$pconfig['natreflection'] == "proxy" ? "selected=\"selected\"" : "";?>>
<?=gettext("Enable (NAT + Proxy)"); ?>
</option>
<option value="purenat" <?=$pconfig['natreflection'] == "purenat" ? "selected=\"selected\"" : "";?>>
<?=gettext("Enable (Pure NAT)"); ?>
</option>
......
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