diff options
author | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-12-23 19:44:45 (GMT) |
---|---|---|
committer | Nicolai <NicolaiSoeborg@users.noreply.github.com> | 2016-12-23 19:44:45 (GMT) |
commit | ea756ac4ad511cab67b0347cd318945bea86a8b9 (patch) | |
tree | 8ca374d7af5fc7ac991dcebd22cda43973139b0f /plugins/check_dns.c | |
parent | 22e78763ea5a1b26b4e44980a3a1410368936846 (diff) | |
download | monitoring-plugins-ea756ac4ad511cab67b0347cd318945bea86a8b9.tar.gz |
check_dns: Tests and info
Diffstat (limited to 'plugins/check_dns.c')
-rw-r--r-- | plugins/check_dns.c | 2 |
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 | ||
314 | unsigned long | 314 | unsigned long |