Merge pull request #2457 from ekoyle/master

Fix librenms auto-discovery
This commit is contained in:
Neil Lathwood
2015-11-19 19:32:14 +00:00
+2 -1
View File
@@ -34,7 +34,8 @@ function discover_new_device($hostname, $device='', $method='', $interface='') {
return false;
}
}
else {
elseif (filter_var($dst_host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === true || filter_var($dst_host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === true){
// gethostbyname returned a valid $ip, was $dst_host an IP?
if ($config['discovery_by_ip'] === false) {
d_echo('Discovery by IP disabled, skipping ' . $dst_host);
return false;