From f81b2675094c6fee9c1c4d390ad90f74207a4491 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 20 Jul 2026 16:14:07 +0200 Subject: [PATCH] Added blocked IPs list to ifstats --- RNS/Interfaces/BackboneInterface.py | 5 +++++ RNS/Reticulum.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/RNS/Interfaces/BackboneInterface.py b/RNS/Interfaces/BackboneInterface.py index 7105a15a..467d84aa 100644 --- a/RNS/Interfaces/BackboneInterface.py +++ b/RNS/Interfaces/BackboneInterface.py @@ -525,6 +525,11 @@ class BackboneInterface(Interface): elif str(e).endswith("Bad file descriptor"): pass else: RNS.log("Error while shutting down socket for "+str(self)+": "+str(e), RNS.LOG_ERROR) + @property + def blocked_ip_list(self): + if not self.block_fast_flapping: return [] + else: return list(self.fast_flapping.keys()) + @property def blocked_ip_count(self): if not self.block_fast_flapping: return 0 diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py index 8c6566ba..1681e44a 100755 --- a/RNS/Reticulum.py +++ b/RNS/Reticulum.py @@ -1418,6 +1418,9 @@ class Reticulum: if hasattr(interface, "blocked_ip_count"): ifstats["blocked_ips"] = interface.blocked_ip_count + if hasattr(interface, "blocked_ip_list"): + ifstats["blocked_ip_list"] = interface.blocked_ip_list + ifstats["name"] = str(interface) ifstats["short_name"] = str(interface.name) ifstats["hash"] = interface.get_hash()