diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-05-04 16:01:15 -0600 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-05-04 16:02:57 -0600 |
commit | f3c5638e508d18d65d796fdde953d31c227e41b9 (patch) | |
tree | e3fed37ef100919ef4a33ebd68c2d466f8c1bd9f /etc/inc/filter.inc | |
parent | 34a3694b096be79311b48f70eab80ec0943e1415 (diff) | |
download | pfsense-f3c5638e508d18d65d796fdde953d31c227e41b9.zip pfsense-f3c5638e508d18d65d796fdde953d31c227e41b9.tar.gz |
Put all of these lines in the block under this condition and remove the irrelevant comment.
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r-- | etc/inc/filter.inc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 94e247b..2da8548 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1283,13 +1283,11 @@ function filter_nat_rules_generate() { $nat_if_list = array(); } - if($srcaddr <> "" && $dstaddr <> "") { + if($srcaddr <> "" && $dstaddr <> "" && $natif) { $srcaddr = trim($srcaddr); $dstaddr = trim($dstaddr); - /* is rule a port range? */ - if($natif) - $natrules .= "{$nordr}rdr {$rdrpass}on {$natif} proto {$protocol} from {$srcaddr} to {$dstaddr}" . ($nordr == "" ? " -> {$target}{$localport}" : ""); + $natrules .= "{$nordr}rdr {$rdrpass}on {$natif} proto {$protocol} from {$srcaddr} to {$dstaddr}" . ($nordr == "" ? " -> {$target}{$localport}" : ""); /* Does this rule redirect back to a internal host? */ if(isset($rule['destination']['any']) && !interface_has_gateway($rule['interface']) && !isset($rule['nordr'])) { |