mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 10:58:42 +00:00
Added parameter for sql query to check ifPhysAddress as thats what lldpRemPortId is
This commit is contained in:
parent
810f53fac7
commit
8ed1a50657
@ -147,7 +147,8 @@ if ($device['os'] == 'pbn' && $config['autodiscovery']['xdp'] === true) {
|
||||
if ($remote_device_id) {
|
||||
$if = $lldp['lldpRemPortDesc'];
|
||||
$id = $lldp['lldpRemPortId'];
|
||||
$remote_port_id = dbFetchCell('SELECT `port_id` FROM `ports` WHERE (`ifDescr` = ? OR `ifName` = ? OR `ifDescr` = ? OR `ifName` = ?) AND `device_id` = ?', array($if, $if, $id, $id, $remote_device_id));
|
||||
$PhysAddress = preg_replace('/ /', '', $id);
|
||||
$remote_port_id = dbFetchCell('SELECT `port_id` FROM `ports` WHERE (`ifDescr` = ? OR `ifName` = ? OR `ifDescr` = ? OR `ifName` = ? OR `ifPhysAddress` = ?) AND `device_id` = ?', array($if, $if, $id, $id, $PhysAddress, $remote_device_id));
|
||||
}
|
||||
else {
|
||||
$remote_port_id = '0';
|
||||
|
Loading…
Reference in New Issue
Block a user