summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorBui <bui@bui.pm>2014-10-06 04:08:10 +0900
committerczaks <marcin@6irc.net>2014-10-05 23:20:06 +0200
commit1e95e588110516ed0d89ddb8546548a6324b3e1a (patch)
tree0639baaf772da4b65f4c807c27525f7aabe6dbe6 /inc
parent8b9932218ffa0e53b05cad5bc769f9317687e6da (diff)
don't break if dns_system is true
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 8c5f46b9..f45e9055 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -2265,7 +2265,6 @@ function rDNS($ip_addr) {
if (!$config['dns_system']) {
$host = gethostbyaddr($ip_addr);
- $isip = filter_var($host, FILTER_VALIDATE_IP);
} else {
$resp = shell_exec_error('host -W 1 ' . $ip_addr);
if (preg_match('/domain name pointer ([^\s]+)$/', $resp, $m))
@@ -2274,6 +2273,8 @@ function rDNS($ip_addr) {
$host = $ip_addr;
}
+ $isip = filter_var($host, FILTER_VALIDATE_IP);
+
if ($config['fcrdns'] && !$isip && gethostbyname($host) != $ip_addr) {
$host = $ip_addr;
}