From aea834001cdfc129d1dc64209c4871a8c06bc1a9 Mon Sep 17 00:00:00 2001 From: Thomas Rieschl Date: Tue, 26 Feb 2013 16:34:08 +0100 Subject: 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 --- etc/inc/easyrule.inc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'etc/inc/easyrule.inc') 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; } -- cgit v1.1