diff options
author | Renato Botelho <renato.botelho@bluepex.com> | 2010-04-12 14:25:48 -0300 |
---|---|---|
committer | Renato Botelho <renato.botelho@bluepex.com> | 2010-04-12 14:25:48 -0300 |
commit | 6b1172af964426713d1c01f3cca07c87e26b09b5 (patch) | |
tree | 05236473ba868d017e6e3942ce3f5e629d905864 | |
parent | 93e485e3c6d1e304bba7108e62bce897cb1a15d0 (diff) | |
download | pfsense-6b1172af964426713d1c01f3cca07c87e26b09b5.zip pfsense-6b1172af964426713d1c01f3cca07c87e26b09b5.tar.gz |
Revert a hook of 3da58362 to fix NAT Reflection rules creation
-rw-r--r-- | etc/inc/filter.inc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 38f989e..bedc4e7 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -741,10 +741,11 @@ function filter_generate_reflection($rule, $dstport, &$starting_localhost_port, $range_end++; /* TODO: support multiple ip's in an alias. */ - - $dstaddr = filter_generate_address($rule, 'destination'); - - if (!$dstaddr && is_ipaddr($FilterIflist[$rule['interface']]['ip'])) + if (is_alias($rule['destination']['address'])) + $dstaddr = filter_expand_alias($rule['destination']['address']); + else if(is_ipaddr($rule['destination']['address'])) + $dstaddr = $rule['destination']['address']; + else if (is_ipaddr($FilterIflist[$rule['interface']]['ip'])) $dstaddr = $FilterIflist[$rule['interface']]['ip']; else return "\n"; |