From ec802efd3b6e58c1158a960af76afd37f25be2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tuomas=20Riihim=C3=A4ki?= Date: Fri, 23 Jan 2015 18:49:19 +0200 Subject: [PATCH] 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." --- includes/discovery/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 44e11bc4e0..9dc4f051ad 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -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;