summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@cmb-macbook-pro.homeunix.net>2009-11-07 20:29:50 -0500
committerChris Buechler <cmb@cmb-macbook-pro.homeunix.net>2009-11-07 20:29:50 -0500
commite979cfc6ba6370556b3602b7ac43bf27e82bb1df (patch)
tree55c23a8c95714a0f400f569b87347fb25cfc00f1
parent4e3cdd2e9f86f8ce57ad45bd7b6f72cbda70509b (diff)
downloadpfsense-e979cfc6ba6370556b3602b7ac43bf27e82bb1df.zip
pfsense-e979cfc6ba6370556b3602b7ac43bf27e82bb1df.tar.gz
Don't add port on no nat rules. Fixes #120
-rw-r--r--etc/inc/filter.inc19
1 files changed, 10 insertions, 9 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 43ecafc..8cc9635 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -543,15 +543,6 @@ function filter_nat_rules_generate_if($if, $src = "any", $srcport = "", $dst = "
if ($dstport != "")
$dst .= " port {$dstport}";
- /* Allow for negating NAT entries */
- if ($nonat) {
- $nat = "no nat";
- $target = "";
- } else {
- $nat = "nat";
- $target = "-> {$tgt}";
- }
-
/* outgoing static-port option, hamachi, Grandstream, VOIP, etc */
if($staticnatport)
$staticnatport_txt = " static-port";
@@ -561,6 +552,16 @@ function filter_nat_rules_generate_if($if, $src = "any", $srcport = "", $dst = "
else
$staticnatport_txt = "";
+ /* Allow for negating NAT entries */
+ if ($nonat) {
+ $nat = "no nat";
+ $target = "";
+ $staticnatport_txt = "";
+ } else {
+ $nat = "nat";
+ $target = "-> {$tgt}";
+ }
+
$if_friendly = convert_real_interface_to_friendly_descr($if);
/* Put all the pieces together */
OpenPOWER on IntegriCloud