Fixed incorrect defaults for IFAC size after increase in default values in RNS

This commit is contained in:
Mark Qvist 2023-12-05 20:40:14 +01:00
parent 7e5948403b
commit c39b7ac148
1 changed files with 12 additions and 2 deletions

View File

@ -2810,6 +2810,11 @@ class SidebandCore():
else:
ifac_netkey = self.config["connect_tcp_ifac_passphrase"]
if ifac_netname != None or ifac_netkey != None:
ifac_size = 16
else:
ifac_size = None
tcpinterface = RNS.Interfaces.TCPInterface.TCPClientInterface(
RNS.Transport,
"TCPClientInterface",
@ -2834,7 +2839,7 @@ class SidebandCore():
else:
if_mode = None
self.reticulum._add_interface(tcpinterface, mode=if_mode, ifac_netname=ifac_netname, ifac_netkey=ifac_netkey)
self.reticulum._add_interface(tcpinterface, mode=if_mode, ifac_netname=ifac_netname, ifac_netkey=ifac_netkey, ifac_size=ifac_size)
self.interface_tcp = tcpinterface
except Exception as e:
@ -2857,6 +2862,11 @@ class SidebandCore():
else:
ifac_netkey = self.config["connect_i2p_ifac_passphrase"]
if ifac_netname != None or ifac_netkey != None:
ifac_size = 16
else:
ifac_size = None
i2pinterface = RNS.Interfaces.I2PInterface.I2PInterface(
RNS.Transport,
"I2PInterface",
@ -2880,7 +2890,7 @@ class SidebandCore():
else:
if_mode = None
self.reticulum._add_interface(i2pinterface, mode = if_mode, ifac_netname=ifac_netname, ifac_netkey=ifac_netkey)
self.reticulum._add_interface(i2pinterface, mode = if_mode, ifac_netname=ifac_netname, ifac_netkey=ifac_netkey, ifac_size=ifac_size)
for si in RNS.Transport.interfaces:
if type(si) == RNS.Interfaces.I2PInterface.I2PInterfacePeer: