Prevent answering path requests on roaming-mode interfaces for next-hop instances on same roaming-mode interface

This commit is contained in:
Mark Qvist 2023-09-13 13:03:22 +02:00
parent 8803dd5b65
commit 2439761529

View File

@ -2047,6 +2047,10 @@ class Transport:
next_hop = Transport.destination_table[destination_hash][1] next_hop = Transport.destination_table[destination_hash][1]
received_from = Transport.destination_table[destination_hash][5] received_from = Transport.destination_table[destination_hash][5]
if attached_interface.mode == RNS.Interfaces.Interface.Interface.MODE_ROAMING and attached_interface == received_from:
RNS.log("Not answering path request on roaming-mode interface, since next hop is on same roaming-mode interface", RNS.LOG_DEBUG)
else:
if requestor_transport_id != None and next_hop == requestor_transport_id: if requestor_transport_id != None and next_hop == requestor_transport_id:
# TODO: Find a bandwidth efficient way to invalidate our # TODO: Find a bandwidth efficient way to invalidate our
# known path on this signal. The obvious way of signing # known path on this signal. The obvious way of signing