mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix database query for known ports in discovery.
While adding configurable port mapping in 2c9df26bbf
I broke the query for known ports from the database so discovery.php considered
ALL ports to be new every time it ran. Whoops.
This went undetected for so long as there is a unique constraint on the ports
table (device_id+ifIndex) which prevented ports from being added again and
again.
Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
This commit is contained in:
@@ -21,7 +21,7 @@ if ($device['port_association_mode'])
|
||||
$port_association_mode = get_port_assoc_mode_name ($device['port_association_mode']);
|
||||
|
||||
// Build array of ports in the database and an ifIndex/ifName -> port_id map
|
||||
$ports_mapped = get_ports_mapped ($device['id']);
|
||||
$ports_mapped = get_ports_mapped ($device['device_id']);
|
||||
$ports_db = $ports_mapped['ports'];
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user