summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-21 02:49:52 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-21 02:49:52 +0000
commit1ef47ac6c12fdd8df3ae10468f41c1d05ed1b510 (patch)
tree191dda3f2b3663089836085f25c5135f1d9de3c0 /etc
parentabc7a3b05cc1e077bdff898ff672adff7bea2e50 (diff)
downloadpfsense-1ef47ac6c12fdd8df3ae10468f41c1d05ed1b510.zip
pfsense-1ef47ac6c12fdd8df3ae10468f41c1d05ed1b510.tar.gz
MFC 7028
Fix broken port redirection to alternate port
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 81b6d8e..4947bd5 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -564,9 +564,9 @@ function filter_nat_rules_generate() {
/* if item is an alias, expand */
if(alias_expand($rule['local-port']))
- $localport = alias_expand_value($rule['local-port']);
+ $localport = "";
else
- $localport = $rule['local-port'];
+ $localport = " port {$rule['local-port']}";
$target = alias_expand_host($rule['target']);
@@ -604,10 +604,10 @@ function filter_nat_rules_generate() {
if ((!$extport[1]) || ($extport[0] == $extport[1])) {
if($rule['protocol'] == "tcp/udp")
$natrules .=
- "rdr on $natif proto { tcp udp } from any to {$extaddr} port { {$extport[0]} } -> {$target} ";
+ "rdr on $natif proto { tcp udp } from any to {$extaddr} port { {$extport[0]} } -> {$target}{$localport}";
else
$natrules .=
- "rdr on $natif proto {$rule['protocol']} from any to {$extaddr} port { {$extport[0]} } -> {$target} ";
+ "rdr on $natif proto {$rule['protocol']} from any to {$extaddr} port { {$extport[0]} } -> {$target}{$localport}";
} else {
if($rule['protocol'] == "tcp/udp")
OpenPOWER on IntegriCloud