mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user