summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-07-25 09:33:03 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-07-25 09:33:03 -0300
commit9d81f904d1572ae1cf648fa8f7f1d180172a4b6f (patch)
treeabf063ee52cc7eee50f7bae38da3041608c5ec3b
parentd580f7b038f4a270688917a80ef1666253726c47 (diff)
downloadpfsense-9d81f904d1572ae1cf648fa8f7f1d180172a4b6f.zip
pfsense-9d81f904d1572ae1cf648fa8f7f1d180172a4b6f.tar.gz
Fix #3106, parse 'not' rules right on destination for port forward + reflection proxy rules
-rw-r--r--etc/inc/filter.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 805859a..b81d636 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1039,11 +1039,12 @@ function filter_generate_reflection($rule, $nordr, $rdr_ifs, $srcaddr, $dstaddr_
}
$dstaddr = explode(" ", $dstaddr_port);
- if($dstaddr[2])
- $rflctintrange = $dstaddr[2];
- else
+ if($dstaddr[2]) {
+ $rflctintrange = array_pop($dstaddr);
+ array_pop($dstaddr);
+ } else
return "";
- $dstaddr = $dstaddr[0];
+ $dstaddr = implode(" ", $dstaddr);
if(empty($dstaddr) || trim($dstaddr) == "0.0.0.0" || strtolower(trim($dstaddr)) == "port")
return "";
OpenPOWER on IntegriCloud