Also remove too old host names from the database.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2020-05-14 18:23:05 +02:00
parent 9207608879
commit 51d801d805
+2 -1
View File
@@ -403,8 +403,9 @@ void parse_neighbor_cache(void)
return;
}
// Remove IP addresses not seen for more than 24 hours to clean the network table from dead addresses
// Remove IP addresses and host names not seen for more than 24 hours
dbquery("DELETE FROM network_addresses WHERE lastSeen < cast(strftime('%%s', 'now') as int)-86400;");
dbquery("DELETE FROM network_names WHERE lastSeen < cast(strftime('%%s', 'now') as int)-86400;");
// Start collecting database commands
lock_shm();