mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated for Scrut fix
This commit is contained in:
@@ -1330,7 +1330,7 @@ function oxidized_reload_nodes() {
|
||||
* @return string ip
|
||||
*
|
||||
**/
|
||||
function dnslookup($device,$type=false) {
|
||||
function dnslookup($device,$type=false,$return=false) {
|
||||
if (filter_var($device['hostname'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) == true || filter_var($device['hostname'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) == truee) {
|
||||
return '';
|
||||
}
|
||||
@@ -1345,6 +1345,9 @@ function dnslookup($device,$type=false) {
|
||||
$return = 'ip';
|
||||
}
|
||||
}
|
||||
if (empty($return)) {
|
||||
return '';
|
||||
}
|
||||
$record = dns_get_record($device['hostname'],$type);
|
||||
return $record[0][$return];
|
||||
}//end dnslookup
|
||||
|
Reference in New Issue
Block a user