fix: Updated ipv4/ipv6 discovery to exclude IPs with invalid port_ids (#6495)

* fix: Updated ipv4/ipv6 discovery to exclude IPs with invalid port_ids

* Update the valid IP sql queries to include addresses without a port

* Fix arp-table too.
This commit is contained in:
Neil Lathwood
2017-04-25 21:28:25 +01:00
committed by GitHub
parent 2361541e33
commit 66b7077a01
4 changed files with 76 additions and 50 deletions

View File

@@ -109,6 +109,11 @@ foreach ($vrfs_lite_cisco as $vrf) {
d_echo(null, '-');
}
}
// remove entries that no longer have an owner
dbQuery('DELETE `ipv4_mac` FROM `ipv4_mac` LEFT JOIN `ports`
ON `ipv4_mac`.`port_id` = `ports`.`port_id` WHERE `ports`.`port_id` IS NULL');
echo PHP_EOL;
unset(
$existing_data,