From c060673bd1ba597c4c80f3a18fd5c47e11a4e120 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Thu, 19 May 2011 18:04:47 +1000 Subject: DNSBL improvements --- inc/functions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'inc/functions.php') diff --git a/inc/functions.php b/inc/functions.php index cc12ce78..3fa99021 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1005,9 +1005,11 @@ foreach($config['dnsbl'] as &$blacklist) { $lookup = $ip . '.' . $blacklist; - if(gethostbyname($lookup) != $lookup) { + $host = gethostbyname($lookup); + if($host != $looku) { // On NXDOMAIN (meaning it's not in the blacklist), gethostbyname() returns the host unchanged. - error(sprintf($config['error']['dnsbl'], $blacklist)); + if(preg_match('/^127\.0\.0\./', $host) && $host != '127.0.0.10') + error(sprintf($config['error']['dnsbl'], $blacklist)); } } } -- cgit v1.3