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