summaryrefslogtreecommitdiffstats
path: root/plugins/check_dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_dns.c')
-rw-r--r--plugins/check_dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 4067c14..5feafc8 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -308,7 +308,7 @@ ip_match_cidr(const char *addr, const char *cidr_ro)
308 mask = atoi(mask_c); 308 mask = atoi(mask_c);
309 309
310 /* https://www.cryptobells.com/verifying-ips-in-a-subnet-in-php/ */ 310 /* https://www.cryptobells.com/verifying-ips-in-a-subnet-in-php/ */
311 return ( ip2long(addr) & ~ ( ( 1 << ( 32 - mask ) ) - 1 ) ) == ( ip2long(subnet) >> (32 - mask) ) << (32 - mask); 311 return (ip2long(addr) & ~((1 << (32 - mask)) - 1)) == (ip2long(subnet) >> (32 - mask)) << (32 - mask);
312} 312}
313 313
314unsigned long 314unsigned long