mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: hostnames returned by discovery protocols with trailing dot (#5571)
This commit is contained in:
committed by
Neil Lathwood
parent
56bb0d2b97
commit
ab03af889a
@@ -648,7 +648,12 @@ function createHost($host, $community, $snmpver, $port = 161, $transport = 'udp'
|
||||
|
||||
function isDomainResolves($domain)
|
||||
{
|
||||
return (gethostbyname($domain) != $domain || count(dns_get_record($domain)) != 0);
|
||||
if (gethostbyname($domain) != $domain) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$records = dns_get_record($domain); // returns array or false
|
||||
return !empty($records);
|
||||
}
|
||||
|
||||
function hoststatus($id)
|
||||
|
Reference in New Issue
Block a user