From 8763e56d20eec74f1c4caaea80ac1cfcb46bbe03 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 27 Oct 2009 20:40:45 -0400 Subject: [PATCH] Fix no nat rules where ports 1024:65535 is added Resolves #120 --- etc/inc/filter.inc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index f7d10ae44b..7cc31a0c8b 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -801,14 +801,18 @@ function filter_nat_rules_generate_if($if, $src = "any", $srcport = "", $dst = " $nat = "nat"; $target = "-> {$tgt}"; } + /* outgoing static-port option, hamachi, Grandstream, VOIP, etc */ - if($staticnatport) + if($staticnatport) { $staticnatport_txt = " static-port"; - else if(!$natport) $staticnatport_txt = " port 1024:65535"; // set source port range else - $staticnatport_txt = ""; + $staticnatport_txt = ""; + } else { + $staticnatport_txt = ""; + } + $if_friendly = convert_friendly_interface_to_friendly_descr($if); /* Put all the pieces together */ if ($if_friendly)