From 95f81cab7f3c10328404b7879521b3129db88cad Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 8 Oct 2021 17:09:11 +0200 Subject: [PATCH] Added path expiry check to tunnel restoration --- RNS/Transport.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RNS/Transport.py b/RNS/Transport.py index 4aae552..d5603d0 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -1115,7 +1115,10 @@ class Transport: else: RNS.log("Did not restore path to "+RNS.prettyhexrep(packet.destination_hash)+" because a newer path with fewer hops exist", RNS.LOG_DEBUG) else: - should_add = True + if time.time() < expires + should_add = True + else: + RNS.log("Did not restore path to "+RNS.prettyhexrep(packet.destination_hash)+" because it has expired", RNS.LOG_DEBUG) if should_add: Transport.destination_table[destination_hash] = new_entry