summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_nat_1to1_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www/firewall_nat_1to1_edit.php')
-rw-r--r--src/usr/local/www/firewall_nat_1to1_edit.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/usr/local/www/firewall_nat_1to1_edit.php b/src/usr/local/www/firewall_nat_1to1_edit.php
index 1c7ba4b..f40a160 100644
--- a/src/usr/local/www/firewall_nat_1to1_edit.php
+++ b/src/usr/local/www/firewall_nat_1to1_edit.php
@@ -132,7 +132,6 @@ if (isset($_GET['dup'])) {
if ($_POST) {
unset($input_errors);
- $pconfig = $_POST;
/* run through $_POST items encoding HTML entities so that the user
* cannot think he is slick and perform a XSS attack on the unwilling
*/
@@ -194,6 +193,8 @@ if ($_POST) {
$_POST['dsttype'] = "single";
}
+ $pconfig = $_POST;
+
/* For external, user can enter only ip's */
if (($_POST['external'] && !is_ipaddr($_POST['external']))) {
$input_errors[] = gettext("A valid external subnet must be specified.");
@@ -308,6 +309,11 @@ function build_srctype_list() {
function srctype_selected() {
global $pconfig;
+ if ($pconfig['srctype']) {
+ // The rule type came from the $_POST array, after input errors, so keep it.
+ return $pconfig['srctype'];
+ }
+
$sel = is_specialnet($pconfig['src']);
if (!$sel) {
@@ -370,6 +376,11 @@ function build_dsttype_list() {
function dsttype_selected() {
global $pconfig;
+ if ($pconfig['dsttype']) {
+ // The rule type came from the $_POST array, after input errors, so keep it.
+ return $pconfig['dsttype'];
+ }
+
$sel = is_specialnet($pconfig['dst']);
if (empty($pconfig['dst']) || $pconfig['dst'] == "any") {
OpenPOWER on IntegriCloud