mirror of
https://github.com/ratspeak/ratdeck.git
synced 2026-10-23 09:42:23 +00:00
Fix announce flood from TCP hub overwhelming device (v1.5.7)
4-layer defense against 100+ node announce storms from rns.ratspeak.org: - Transport-level rate limiter (5/sec) via filter_packet callback, before Ed25519 verify - TCP frame processing time-boxed to 15ms per loop iteration - Global announce rate limit (3/sec) in AnnounceManager - UI rebuild throttled to once per 2 seconds Also fixes message status not persisting to disk on queue drain.
This commit is contained in:
1 parent
9c48530ec8
commit
6f272596c8
11 files changed
+115
-5
No files matched your search
@@ -28,9 +28,14 @@ void LXMFManager::loop() {
|
||||
Serial.printf("[LXMF] Queue drain: status=%s dest=%s\n",
|
||||
msg.statusStr(), msg.destHash.toHex().substr(0, 8).c_str());
|
||||
|
||||
// Persist updated status to disk so reloads don't revert to QUEUED
|
||||
std::string peerHex = msg.destHash.toHex();
|
||||
if (_store) {
|
||||
_store->updateMessageStatus(peerHex, msg.timestamp, false, msg.status);
|
||||
}
|
||||
|
||||
// Fire status callback so UI can refresh
|
||||
if (_statusCb) {
|
||||
std::string peerHex = msg.destHash.toHex();
|
||||
_statusCb(peerHex, msg.timestamp, msg.status);
|
||||
}
|
||||
_outQueue.pop_front();
|
||||
|
||||
Reference in new issue
Block a user