diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-05-04 04:19:37 -0600 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-05-04 04:19:37 -0600 |
commit | 9fdfdc5b31b1e42a8936b0234ecd0d31d230c385 (patch) | |
tree | aecc5ef529ec951af5b9976529975621619c5943 /etc | |
parent | 8ea2f0222912fcbff94cd8ebb06535b7fe709fef (diff) | |
download | pfsense-9fdfdc5b31b1e42a8936b0234ecd0d31d230c385.zip pfsense-9fdfdc5b31b1e42a8936b0234ecd0d31d230c385.tar.gz |
When 'No RDR' is set, skip some code that does not apply.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 0c13c35..94e247b 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -1246,7 +1246,7 @@ function filter_nat_rules_generate() { } $target = alias_expand($rule['target']); - if(!$target) { + if(!$target && !isset($rule['nordr'])) { $natrules .= "# Unresolvable alias {$rule['target']}\n"; continue; /* unresolvable alias */ } @@ -1292,7 +1292,7 @@ function filter_nat_rules_generate() { $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'])) { + if(isset($rule['destination']['any']) && !interface_has_gateway($rule['interface']) && !isset($rule['nordr'])) { $rule_interface_ip = find_interface_ip($natif); $rule_interface_subnet = find_interface_subnet($natif); $rule_subnet = gen_subnet($rule_interface_ip, $rule_interface_subnet); |