From 82b8e1f79af563f3b8893d842072533b44ec8a80 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 17 Jan 2026 17:17:39 +0100 Subject: [PATCH] Clean discovered interfaces with invalid target address --- RNS/Discovery.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RNS/Discovery.py b/RNS/Discovery.py index c1569159..03707483 100644 --- a/RNS/Discovery.py +++ b/RNS/Discovery.py @@ -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)