From 23f2825d1f698f424aca366a7ee2e90026e121aa Mon Sep 17 00:00:00 2001 From: laf Date: Wed, 20 May 2015 13:22:58 +0100 Subject: [PATCH] Removed code that performs hostname check --- includes/functions.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 9b2a84810..e72250d66 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -285,9 +285,6 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp', $quiet = '0 // Test Database Exists if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `hostname` = ?", array($host)) == '0') { - // Test if IP or Hostname - if (!(inet_pton($host))) - { // Test reachability if ($force_add == 1 || isPingable($host)) { @@ -372,10 +369,6 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp', $quiet = '0 // failed Reachability if($quiet == '0') { print_error("Could not ping $host"); } } - } else { - // Failed DNS lookup - if($quiet == '0') { print_error("$host looks like an IP address, please use FQDN"); } - } } else { // found in database if($quiet == '0') { print_error("Already got host $host"); }