summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-12-06 17:54:05 -0200
committerRenato Botelho <renato@netgate.com>2016-12-06 17:54:05 -0200
commit45d8b8a6037bfe63e222d52deaab7b2779891961 (patch)
treecce1b7b915b23be0b42b39f1f5eccf2a12b97c79 /src
parentd253d5c6a99b80f8c778faf3c04bc9e051ce8b5c (diff)
parentd99ce9ccbfde0b557afb03576d38a17f5c9ed3b9 (diff)
downloadpfsense-45d8b8a6037bfe63e222d52deaab7b2779891961.zip
pfsense-45d8b8a6037bfe63e222d52deaab7b2779891961.tar.gz
Merge pull request #3256 from phil-davis/patch-5
Diffstat (limited to 'src')
-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 4d7ebe9..17600d3 100644
--- a/src/usr/local/www/firewall_nat_1to1_edit.php
+++ b/src/usr/local/www/firewall_nat_1to1_edit.php
@@ -100,7 +100,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
*/
@@ -162,6 +161,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.");
@@ -276,6 +277,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) {
@@ -337,6 +343,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