summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-05-04 04:19:37 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-05-04 04:19:37 -0600
commit9fdfdc5b31b1e42a8936b0234ecd0d31d230c385 (patch)
treeaecc5ef529ec951af5b9976529975621619c5943 /etc
parent8ea2f0222912fcbff94cd8ebb06535b7fe709fef (diff)
downloadpfsense-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.inc4
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);
OpenPOWER on IntegriCloud