Fixed interface mode inheritance

This commit is contained in:
Mark Qvist 2022-05-23 00:06:26 +02:00
parent f8db5a545d
commit cf3e47f469
3 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -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