From 0bb11087715b944e73e28ffc84273cb6b8a9b261 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sun, 19 May 2024 12:35:38 +0200 Subject: [PATCH] Mark path unresponsive when link establishment fails due to potential interface-local destination roaming --- RNS/Transport.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RNS/Transport.py b/RNS/Transport.py index b76f91e..516a81f 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -482,12 +482,17 @@ class Transport: # If the link destination was previously only 1 hop # away, this likely means that it was local to one # of our interfaces, and that it roamed somewhere else. - # In that case, try to discover a new path. + # In that case, try to discover a new path, and mark + # the old one as unresponsive. elif not path_request_throttle and Transport.hops_to(link_entry[6]) == 1: RNS.log("Trying to rediscover path for "+RNS.prettyhexrep(link_entry[6])+" since an attempted link was never established, and destination was previously local to an interface on this instance", RNS.LOG_DEBUG) path_request_conditions = True blocked_if = link_entry[4] + if RNS.Reticulum.transport_enabled(): + if hasattr(link_entry[4], "mode") and link_entry[4].mode != RNS.Interfaces.Interface.Interface.MODE_BOUNDARY: + Transport.mark_path_unresponsive(link_entry[6]) + # If the link initiator is only 1 hop away, # this likely means that network topology has # changed. In that case, we try to discover a new path,