diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-19 18:04:47 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-19 18:04:47 +1000 |
| commit | c060673bd1ba597c4c80f3a18fd5c47e11a4e120 (patch) | |
| tree | 775c384b047afcc1380964ebdd8a7c5459c96b6b /inc/functions.php | |
| parent | db1f0e9446e67168668ec15440c6a55f0e6234b4 (diff) | |
DNSBL improvements
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 6 |
1 files changed, 4 insertions, 2 deletions
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)); } } } |
