diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-21 02:49:52 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-21 02:49:52 +0000 |
commit | 1ef47ac6c12fdd8df3ae10468f41c1d05ed1b510 (patch) | |
tree | 191dda3f2b3663089836085f25c5135f1d9de3c0 | |
parent | abc7a3b05cc1e077bdff898ff672adff7bea2e50 (diff) | |
download | pfsense-1ef47ac6c12fdd8df3ae10468f41c1d05ed1b510.zip pfsense-1ef47ac6c12fdd8df3ae10468f41c1d05ed1b510.tar.gz |
MFC 7028
Fix broken port redirection to alternate port
-rw-r--r-- | etc/inc/filter.inc | 8 |
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") |