@@ -306,6 +306,8 @@ class I2PInterfacePeer(Interface):
306
306
def __init__ (self , parent_interface , owner , name , target_i2p_dest = None , connected_socket = None , max_reconnect_tries = None ):
307
307
self .rxb = 0
308
308
self .txb = 0
309
+
310
+ self .HW_MTU = 1064
309
311
310
312
self .IN = True
311
313
self .OUT = False
@@ -569,7 +571,7 @@ def read_loop(self):
569
571
in_frame = True
570
572
command = KISS .CMD_UNKNOWN
571
573
data_buffer = b""
572
- elif (in_frame and len (data_buffer ) < RNS . Reticulum . MTU ):
574
+ elif (in_frame and len (data_buffer ) < self . HW_MTU ):
573
575
if (len (data_buffer ) == 0 and command == KISS .CMD_UNKNOWN ):
574
576
# We only support one HDLC port for now, so
575
577
# strip off the port nibble
@@ -595,7 +597,7 @@ def read_loop(self):
595
597
elif (byte == HDLC .FLAG ):
596
598
in_frame = True
597
599
data_buffer = b""
598
- elif (in_frame and len (data_buffer ) < RNS . Reticulum . MTU ):
600
+ elif (in_frame and len (data_buffer ) < self . HW_MTU ):
599
601
if (byte == HDLC .ESC ):
600
602
escape = True
601
603
else :
@@ -660,6 +662,9 @@ class I2PInterface(Interface):
660
662
def __init__ (self , owner , name , rns_storagepath , peers , connectable = False ):
661
663
self .rxb = 0
662
664
self .txb = 0
665
+
666
+ self .HW_MTU = 1064
667
+
663
668
self .online = False
664
669
self .clients = 0
665
670
self .owner = owner
@@ -757,6 +762,7 @@ def incoming_connection(self, handler):
757
762
spawned_interface .announce_rate_grace = self .announce_rate_grace
758
763
spawned_interface .announce_rate_penalty = self .announce_rate_penalty
759
764
spawned_interface .mode = self .mode
765
+ spawned_interface .HW_MTU = self .HW_MTU
760
766
RNS .log ("Spawned new I2PInterface Peer: " + str (spawned_interface ), RNS .LOG_VERBOSE )
761
767
RNS .Transport .interfaces .append (spawned_interface )
762
768
self .clients += 1
0 commit comments