From 0d249b9d1b59555bb97491b48743d8455ff3039f Mon Sep 17 00:00:00 2001 From: Vince Date: Wed, 10 Oct 2012 14:27:43 -0700 Subject: Small cleanup for readability Small cleanup for readability --- config/pf-blocker/pfblocker.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3