Fix librenms auto-discovery

This commit is contained in:
Eldon Koyle
2015-11-18 14:48:54 -07:00
parent f87139f219
commit fb0501588e
+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;