diff options
author | Jim P <jim@pingle.org> | 2013-02-26 07:46:23 -0800 |
---|---|---|
committer | Jim P <jim@pingle.org> | 2013-02-26 07:46:23 -0800 |
commit | ff13c4e52c305b7ec9baf7504bc2a34918b83be6 (patch) | |
tree | eec62ed32c92e613847b2fb952b44aefd3dbb990 | |
parent | 5e8eded5a38a3ed66c4f654de0b3793ad9961225 (diff) | |
parent | aea834001cdfc129d1dc64209c4871a8c06bc1a9 (diff) | |
download | pfsense-ff13c4e52c305b7ec9baf7504bc2a34918b83be6.zip pfsense-ff13c4e52c305b7ec9baf7504bc2a34918b83be6.tar.gz |
Merge pull request #441 from neo14/master
Set correct netmask for IPv6 addresses when creating an easy rule: pass
-rw-r--r-- | etc/inc/easyrule.inc | 4 |
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; } |