mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
Fix librenms auto-discovery
This commit is contained in:
@@ -34,7 +34,8 @@ function discover_new_device($hostname, $device='', $method='', $interface='') {
|
|||||||
return false;
|
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) {
|
if ($config['discovery_by_ip'] === false) {
|
||||||
d_echo('Discovery by IP disabled, skipping ' . $dst_host);
|
d_echo('Discovery by IP disabled, skipping ' . $dst_host);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user