summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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