From 88c629e3ad148bda4fd9b645a4075c72218fbd8f Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sun, 23 Aug 2026 18:01:13 +0200 Subject: [PATCH] Logging and MTU adjustments --- RNS/Interfaces/BackboneInterface.py | 2 +- RNS/Interfaces/Interface.py | 2 +- RNS/Interfaces/LocalInterface.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/RNS/Interfaces/BackboneInterface.py b/RNS/Interfaces/BackboneInterface.py index d196efe9..27e22bb7 100644 --- a/RNS/Interfaces/BackboneInterface.py +++ b/RNS/Interfaces/BackboneInterface.py @@ -50,7 +50,7 @@ class HDLC(): class BackboneInterface(Interface): HW_MTU = 1048576 - BITRATE_GUESS = 1_000_000_000 + BITRATE_GUESS = 500_000_000 DEFAULT_IFAC_SIZE = 16 AUTOCONFIGURE_MTU = True diff --git a/RNS/Interfaces/Interface.py b/RNS/Interfaces/Interface.py index 88f25c9c..86027085 100755 --- a/RNS/Interfaces/Interface.py +++ b/RNS/Interfaces/Interface.py @@ -242,7 +242,7 @@ class Interface: elif self.bitrate > 62_500: self.HW_MTU = 1024 else: self.HW_MTU = None - RNS.log(f"{self} hardware MTU set to {self.HW_MTU}", RNS.LOG_PATHING) + RNS.log(f"{self} hardware MTU set to {self.HW_MTU}", RNS.LOG_DEBUG) def age(self): return time.time()-self.created diff --git a/RNS/Interfaces/LocalInterface.py b/RNS/Interfaces/LocalInterface.py index a68c2d64..a0c402ed 100644 --- a/RNS/Interfaces/LocalInterface.py +++ b/RNS/Interfaces/LocalInterface.py @@ -195,7 +195,7 @@ class LocalClientInterface(Interface): def send_keepalive(self): if self.online: - RNS.log(f"Sending keepalive on {self}", RNS.LOG_DEBUG) # TODO: Remove + RNS.log(f"Sending keepalive on {self}", RNS.LOG_EXTREME) if RNS.sl(RNS.LOG_EXTREME) else None try: if self.epoll_backend: self.transmit_buffer += bytes([HDLC.FLAG])+bytes([HDLC.FLAG]) @@ -220,7 +220,7 @@ class LocalClientInterface(Interface): def process_outgoing(self, data): if self.pause_on_client_sleep and time.time() > self.pause_timeout: - RNS.log(f"TX paused for LocalInterface client, dropping outbound packet", RNS.LOG_DEBUG) # TODO: Remove + RNS.log(f"TX paused for LocalInterface client, dropping outbound packet", RNS.LOG_DEBUG) if RNS.sl(RNS.LOG_DEBUG) else None # TODO: Remove return if self.online: @@ -431,6 +431,7 @@ class LocalServerInterface(Interface): self.announce_rate_grace = None self.announce_rate_penalty = None + self.HW_MTU = 262144 self.bitrate = 1000*1000*1000 self.online = True