Fix USB radio stalls and add durable replay timestamp recovery
This commit is contained in:
1 parent
f2c15225cc
commit
a8cf4fd12f
44 files changed
+4339
-148
No files matched your search
@@ -51,6 +51,13 @@ struct ClientInfo {
|
||||
#define MAX_CLIENTS 32
|
||||
#endif
|
||||
|
||||
struct ClientLoginReplayClampResult {
|
||||
uint16_t stored_matched;
|
||||
uint16_t stored_changed;
|
||||
uint16_t live_matched;
|
||||
uint16_t live_changed;
|
||||
};
|
||||
|
||||
class ClientACL {
|
||||
FILESYSTEM* _fs;
|
||||
ClientInfo clients[MAX_CLIENTS];
|
||||
@@ -81,6 +88,15 @@ public:
|
||||
uint32_t runtime_last_timestamp,
|
||||
uint8_t login_permissions);
|
||||
|
||||
// Explicitly authorized recovery only: the caller validates its transport,
|
||||
// permissions and clock. A non-null selector is a complete PUB_KEY_SIZE key;
|
||||
// null selects all records, including historical identities outside the ACL.
|
||||
// Only lower existing values to now. Never insert/delete records or raise a
|
||||
// floor. Publish durable changes before live changes; false returns zero
|
||||
// counts and leaves live state untouched. Counts include duplicate records.
|
||||
bool clampLoginReplayTimestamps(const uint8_t* pubkey, uint32_t now,
|
||||
ClientLoginReplayClampResult& result);
|
||||
|
||||
ClientInfo* getClient(const uint8_t* pubkey, int key_len);
|
||||
ClientInfo* putClient(const mesh::Identity& id, uint8_t init_perms);
|
||||
bool applyPermissions(const mesh::LocalIdentity& self_id, const uint8_t* pubkey, int key_len, uint8_t perms);
|
||||
|
||||
Reference in new issue
Block a user