From cc25e87bcd8ac022358d900a6660405741864204 Mon Sep 17 00:00:00 2001 From: laf Date: Mon, 18 Jan 2016 00:04:30 +0000 Subject: [PATCH] Added check for hostname --- includes/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 63fd646b7..c9a9a2709 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -1331,6 +1331,9 @@ function oxidized_reload_nodes() { * **/ 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)) { // We are going to use the transport to work out the record type if ($device['transport'] == 'udp6' || $device['transport'] == 'tcp6') {