summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_edit.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-11-20 08:26:08 -0500
committerjim-p <jimp@pfsense.org>2012-11-20 08:31:07 -0500
commit6e557facee6376b067f69ff3a40c559bb6dcdc02 (patch)
tree7b8de4c28b023f7abe9a18c6c56ad12b5fb50f31 /usr/local/www/firewall_nat_edit.php
parent14ad84bc79d262e91d33d812171209ad07eac7cd (diff)
downloadpfsense-6e557facee6376b067f69ff3a40c559bb6dcdc02.zip
pfsense-6e557facee6376b067f69ff3a40c559bb6dcdc02.tar.gz
Only apply this port check for TCP and UDP.
Diffstat (limited to 'usr/local/www/firewall_nat_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_edit.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index 768fb8f..a05cc17 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -229,7 +229,7 @@ if ($_POST) {
if ($_POST['dstendport'] && !is_portoralias($_POST['dstendport']))
$input_errors[] = sprintf(gettext("%s is not a valid end destination port. It must be a port alias or integer between 1 and 65535."), $_POST['dstendport']);
- if (!isset($_POST['nordr']) && $_POST['localbeginport'] && !is_portoralias($_POST['localbeginport'])) {
+ if ((strtoupper($_POST['proto']) == "TCP" || strtoupper($_POST['proto']) == "UDP" || strtoupper($_POST['proto']) == "TCP/UDP") && (!isset($_POST['nordr']) && !is_portoralias($_POST['localbeginport']))) {
$input_errors[] = sprintf(gettext("A valid local port must be specified. It must be a port alias or integer between 1 and 65535."), $_POST['localbeginport']);
}
OpenPOWER on IntegriCloud