From cf3e47f469687239e9e2b64d2451d3dc317b68ac Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 23 May 2022 00:06:26 +0200 Subject: [PATCH] Fixed interface mode inheritance --- RNS/Interfaces/I2PInterface.py | 1 + RNS/Interfaces/TCPInterface.py | 1 + RNS/Reticulum.py | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RNS/Interfaces/I2PInterface.py b/RNS/Interfaces/I2PInterface.py index fc52555..85da77d 100644 --- a/RNS/Interfaces/I2PInterface.py +++ b/RNS/Interfaces/I2PInterface.py @@ -602,6 +602,7 @@ class I2PInterface(Interface): spawned_interface.announce_rate_target = self.announce_rate_target spawned_interface.announce_rate_grace = self.announce_rate_grace spawned_interface.announce_rate_penalty = self.announce_rate_penalty + spawned_interface.mode = self.mode RNS.log("Spawned new I2PInterface Peer: "+str(spawned_interface), RNS.LOG_VERBOSE) RNS.Transport.interfaces.append(spawned_interface) self.clients += 1 diff --git a/RNS/Interfaces/TCPInterface.py b/RNS/Interfaces/TCPInterface.py index fe30ce0..d1dbf8a 100644 --- a/RNS/Interfaces/TCPInterface.py +++ b/RNS/Interfaces/TCPInterface.py @@ -459,6 +459,7 @@ class TCPServerInterface(Interface): spawned_interface.announce_rate_target = self.announce_rate_target spawned_interface.announce_rate_grace = self.announce_rate_grace spawned_interface.announce_rate_penalty = self.announce_rate_penalty + spawned_interface.mode = self.mode spawned_interface.online = True RNS.log("Spawned new TCPClient Interface: "+str(spawned_interface), RNS.LOG_VERBOSE) RNS.Transport.interfaces.append(spawned_interface) diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index b34b065..5aa6cd6 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -535,7 +535,7 @@ class Reticulum: else: interface.OUT = True - if interface_mode == Interface.Interface.MODE_AP: + if interface_mode == Interface.Interface.MODE_ACCESS_POINT: RNS.log(str(interface)+" does not support Access Point mode, reverting to default mode: Full", RNS.LOG_WARNING) interface_mode = Interface.Interface.MODE_FULL @@ -570,7 +570,7 @@ class Reticulum: else: interface.OUT = True - if interface_mode == Interface.Interface.MODE_AP: + if interface_mode == Interface.Interface.MODE_ACCESS_POINT: RNS.log(str(interface)+" does not support Access Point mode, reverting to default mode: Full", RNS.LOG_WARNING) interface_mode = Interface.Interface.MODE_FULL @@ -601,7 +601,7 @@ class Reticulum: else: interface.OUT = True - if interface_mode == Interface.Interface.MODE_AP: + if interface_mode == Interface.Interface.MODE_ACCESS_POINT: RNS.log(str(interface)+" does not support Access Point mode, reverting to default mode: Full", RNS.LOG_WARNING) interface_mode = Interface.Interface.MODE_FULL