diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-24 21:01:22 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-24 21:01:22 +0000 |
commit | 8ffd7b68d63ac79ac401543d7db90302d746ca27 (patch) | |
tree | e1e9bfe384d8b5a729d8f527a6741078f9db00e0 /etc | |
parent | dbfda0895832791fb48d02a96195610b8cf671bd (diff) | |
download | pfsense-8ffd7b68d63ac79ac401543d7db90302d746ca27.zip pfsense-8ffd7b68d63ac79ac401543d7db90302d746ca27.tar.gz |
MFC 7126
Correctly define port rule.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index d13261e..a7ae3c4 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -370,9 +370,11 @@ function filter_nat_rules_generate_if($if, $src, $srcport, $dst, $natport, $targ /* set the source port the world sees */ if ($srcport) - $second_half_of_rule .= " port {$srcport}"; + $srcport_rule .= " port {$srcport}"; + else + $srcport_rule = ""; - $natrule = "{$nat} on {$if} from {$src} to {$dst} {$second_half_of_rule}\n"; + $natrule = "{$nat} on {$if} from {$src}{$srcport_rule} to {$dst} {$second_half_of_rule}\n"; return $natrule; } |