summaryrefslogtreecommitdiffstats
path: root/etc/inc/easyrule.inc
diff options
context:
space:
mode:
authorThomas Rieschl <thomas@trinet.at>2013-02-26 16:34:08 +0100
committerThomas Rieschl <thomas@trinet.at>2013-02-26 16:34:08 +0100
commitaea834001cdfc129d1dc64209c4871a8c06bc1a9 (patch)
treeeec62ed32c92e613847b2fb952b44aefd3dbb990 /etc/inc/easyrule.inc
parente700d2ee1b327b4a4eb71324fe75737fc2ac0c96 (diff)
downloadpfsense-aea834001cdfc129d1dc64209c4871a8c06bc1a9.zip
pfsense-aea834001cdfc129d1dc64209c4871a8c06bc1a9.tar.gz
no IPv6 check when an easy rule: pass is created
The easyrule_pass_rule_add() now checks for an IPv6 address and sets the netmask accordingly. This is the fix for bug: http://redmine.pfsense.org/issues/2843
Diffstat (limited to 'etc/inc/easyrule.inc')
-rw-r--r--etc/inc/easyrule.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/etc/inc/easyrule.inc b/etc/inc/easyrule.inc
index dfd103a..d7bbcf9 100644
--- a/etc/inc/easyrule.inc
+++ b/etc/inc/easyrule.inc
@@ -275,6 +275,8 @@ function easyrule_pass_rule_add($int, $proto, $srchost, $dsthost, $dstport, $ipp
list($srchost, $srcmask) = explode("/", $srchost);
} elseif (is_specialnet($srchost)) {
$srcmask = 0;
+ } elseif (is_ipaddrv6($srchost)) {
+ $srcmask = 128;
} else {
$srcmask = 32;
}
@@ -283,6 +285,8 @@ function easyrule_pass_rule_add($int, $proto, $srchost, $dsthost, $dstport, $ipp
list($dsthost, $dstmask) = explode("/", $dsthost);
} elseif (is_specialnet($dsthost)) {
$dstmask = 0;
+ } elseif (is_ipaddrv6($dsthost)) {
+ $dstmask = 128;
} else {
$dstmask = 32;
}
OpenPOWER on IntegriCloud