aboutsummaryrefslogtreecommitdiffstats
path: root/config/pf-blocker
diff options
context:
space:
mode:
authorVince <github@darkain.com>2012-10-10 11:04:55 -0700
committerVince <github@darkain.com>2012-10-10 11:04:55 -0700
commita32fc3f11a09385eaf7709d99158363cdbf5e608 (patch)
tree998b5e7b478e476591c41139f875b94ddf6bd5c4 /config/pf-blocker
parent83f8ac2d59dc43987d87299e954f3b664c12f0d2 (diff)
downloadpfsense-packages-a32fc3f11a09385eaf7709d99158363cdbf5e608.tar.gz
pfsense-packages-a32fc3f11a09385eaf7709d99158363cdbf5e608.tar.bz2
pfsense-packages-a32fc3f11a09385eaf7709d99158363cdbf5e608.zip
Net masking math was off by 1
Net masking math was off by 1
Diffstat (limited to 'config/pf-blocker')
-rwxr-xr-xconfig/pf-blocker/pfblocker.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/pf-blocker/pfblocker.inc b/config/pf-blocker/pfblocker.inc
index 64171b01..53e2453e 100755
--- a/config/pf-blocker/pfblocker.inc
+++ b/config/pf-blocker/pfblocker.inc
@@ -70,7 +70,7 @@ function pfblocker_Range2CIDR($ip_min, $ip_max) {
if ($bits < 0)
return "";
#identify first ip on range network
- $network=long2ip($ip_min_long & (2<<32)-(2<<(32-$bits)));
+ $network=long2ip($ip_min_long & (2<<32)-(2<<(31-$bits)));
#print decbin($ip_min_long)."\n".$network."\n";
return $network . "/". $bits;
}