aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 53e2453e..58b93bb5 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<<(31-$bits)));
+ $network=long2ip( $ip_min_long & ((1<<32)-(1<<(32-$bits))-1) );
#print decbin($ip_min_long)."\n".$network."\n";
return $network . "/". $bits;
}