Clean discovered interfaces with invalid target address

This commit is contained in:
Mark Qvist
2026-01-17 17:17:39 +01:00
parent 85e2ca96bc
commit 82b8e1f79a

View File

@@ -382,6 +382,8 @@ class InterfaceDiscovery():
if heard_delta > self.THRESHOLD_REMOVE: should_remove = True
elif discovery_sources and not "network_id" in info: should_remove = True
elif discovery_sources and not bytes.fromhex(info["network_id"]) in discovery_sources: should_remove = True
elif "reachable_on" in info:
if not (is_ip_address(info["reachable_on"]) or is_hostname(info["reachable_on"])): should_remove = True
if should_remove:
os.unlink(filepath)