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:
Maximilian Wilhelm
2016-06-14 13:12:12 +02:00
parent 779c4dee71
commit 2fd9879278

View File

@@ -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'];
//