mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added check for hostname
This commit is contained in:
@@ -1331,6 +1331,9 @@ function oxidized_reload_nodes() {
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
function dnslookup($device,$type=false) {
|
function dnslookup($device,$type=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 '';
|
||||||
|
}
|
||||||
if (empty($type)) {
|
if (empty($type)) {
|
||||||
// We are going to use the transport to work out the record type
|
// We are going to use the transport to work out the record type
|
||||||
if ($device['transport'] == 'udp6' || $device['transport'] == 'tcp6') {
|
if ($device['transport'] == 'udp6' || $device['transport'] == 'tcp6') {
|
||||||
|
|||||||
Reference in New Issue
Block a user