mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Improvement for matching LLDP neighbors with known hosts. (#11445)
* Minor addition to find_device_id, such that we match LLDP hosts presenting with FQDN with devices where $hostname + $config['mydomain'] is a match. This yields clickable links in the neighbor overview. * Modified to comply with comments in code review
This commit is contained in:
@@ -1369,6 +1369,10 @@ function find_device_id($name = '', $ip = '', $mac_address = '')
|
||||
if ($mydomain = Config::get('mydomain')) {
|
||||
$where[] = '`hostname`=?';
|
||||
$params[] = "$name.$mydomain";
|
||||
|
||||
$where[] = 'concat(`hostname`, \'.\', ?) =?';
|
||||
$params[] = "$mydomain";
|
||||
$params[] = "$name";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user