mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Do not add empty $config['mydomain'] when autodiscovering
When \$config['mydomain'] variable is empty, '.' is appended to the device hostname. This patch adds a check to prevent that."
This commit is contained in:
@ -16,7 +16,7 @@ function discover_new_device($hostname)
|
||||
global $config, $debug;
|
||||
|
||||
if ($config['autodiscovery']['xdp']) {
|
||||
if ( isDomainResolves($hostname . "." . $config['mydomain']) ) {
|
||||
if (!empty($config['mydomain']) && isDomainResolves($hostname . "." . $config['mydomain']) ) {
|
||||
$dst_host = $hostname . "." . $config['mydomain'];
|
||||
} else {
|
||||
$dst_host = $hostname;
|
||||
|
Reference in New Issue
Block a user