summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2025-04-10 14:20:55 +0200
committerUrban Müller2025-04-10 14:20:55 +0200
commite8b681292ae469a64df6033965babbe63be0290b (patch)
treef19d33d395e45dfcfdef4f8a839b4693884a47a2 /it.class
parenteac020907afced2c33db53b564a80e4764dfe3b7 (diff)
downloaditools-e8b681292ae469a64df6033965babbe63be0290b.tar.gz
itools-e8b681292ae469a64df6033965babbe63be0290b.tar.bz2
itools-e8b681292ae469a64df6033965babbe63be0290b.zip
return matching CIDR for tracking
Diffstat (limited to 'it.class')
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index a114e35..83e7d0e 100644
--- a/it.class
+++ b/it.class
@@ -423,7 +423,7 @@ static function cidr_match($ip, $cidrs)
$lastbyte_matched = $bitmask ? (ord($ip_bin[$valid_bytes]) & $bitmask) == (ord($subnet_bin[$valid_bytes]) & $bitmask) : true;
if (substr($ip_bin, 0, $valid_bytes) == substr($subnet_bin, 0, $valid_bytes) && $lastbyte_matched)
- return true;
+ return $cidr;
}
return false;