summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-19 00:50:49 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-19 00:50:49 +0000
commit0cea6311c545e21cc55fcf38ce8042011a8580e7 (patch)
treee5f73eb362688f33b8b99c7d725934f5e56aba68 /usr/local/www/firewall_nat_edit.php
parent61438a1e2cee7388de7a2fceb014fcedbfe2eeb6 (diff)
downloadpfsense-0cea6311c545e21cc55fcf38ce8042011a8580e7.zip
pfsense-0cea6311c545e21cc55fcf38ce8042011a8580e7.tar.gz
Sync w/ m0n0wall 1.21 to bring back in the overlap port check
Diffstat (limited to 'usr/local/www/firewall_nat_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_edit.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index c1b58ab..f75e102 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -133,14 +133,16 @@ if ($_POST) {
continue;
if ($natent['external-address'] != $_POST['extaddr'])
continue;
-
+ if (($natent['proto'] != $_POST['proto']) && ($natent['proto'] != "tcp/udp") && ($_POST['proto'] != "tcp/udp"))
+ continue;
+
list($begp,$endp) = explode("-", $natent['external-port']);
if (!$endp)
$endp = $begp;
-
+
if (!( (($_POST['beginport'] < $begp) && ($_POST['endport'] < $begp))
|| (($_POST['beginport'] > $endp) && ($_POST['endport'] > $endp)))) {
-
+
$input_errors[] = "The external port range overlaps with an existing entry.";
break;
}
OpenPOWER on IntegriCloud