simple_repeater: filter hash -- runtime deny-forward podle hashe kanálu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5.5 committed 2026-10-14 20:34:19 +02:00
1 parent a79860e9c9
commit 4ca0850369
4 files changed
+113

No files matched your search

+4
View File
@@ -209,6 +209,7 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
// CUSTOM (TeTeHacko): token-bucket limiter over FORWARDED traffic (port of
// upstream proposal #1502). Kill switch: _prefs.fairness_enabled.
FairnessLimiter fairness_limiter;
uint32_t filter_hash_dropped; // forwards vetoed by the channel-hash deny list
unsigned long next_fair_sender_normal_refill, next_fair_sender_low_refill, next_fair_group_refill;
uint32_t pending_discover_tag;
unsigned long pending_discover_until;
@@ -321,6 +322,9 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
#endif
// CUSTOM (TeTeHacko): `fairness [on|off|grid|cap ...|refill ...]` CLI. Defined in MyMesh.cpp.
bool fairnessHandleCommand(const char* command, char* reply, int reply_max);
// CUSTOM (TeTeHacko): keyless deny-forward by channel hash. Definitions in ChannelFilter.h.
bool filterHashDenied(const mesh::Packet* packet) const;
bool filterHashHandleCommand(const char* command, char* reply, int reply_max);
// Refill interval in ms: persisted pref (seconds) if set, else the build default.
uint32_t fairGroupRefillMs() const {
return _prefs.fair_group_refill_s ? (uint32_t)_prefs.fair_group_refill_s * 1000 : FAIRNESS_GROUP_REFILL_MS;