mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-11-29 19:36:55 -05:00
Added blocked IPs list to ifstats
This commit is contained in:
parent
6527423526
commit
f81b267509
2 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue