rwhod: put max cap on status update storage
Without a max cap, someone could potentially flood our memory by posting tons and tons of spoofed status updates.
This commit is contained in:
+4
-4
@@ -1,14 +1,14 @@
|
||||
mod packet_receiver;
|
||||
mod packet_sender;
|
||||
mod rwhod_status;
|
||||
mod status_registry;
|
||||
|
||||
pub use packet_receiver::rwhod_packet_receiver_task;
|
||||
pub use packet_sender::{determine_relevant_interfaces, rwhod_packet_sender_task};
|
||||
pub use rwhod_status::{generate_rwhod_status_update, generate_rwhod_user_entries};
|
||||
pub use status_registry::RwhodStatusRegistry;
|
||||
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
use crate::proto::WhodStatusUpdate;
|
||||
|
||||
pub type RwhodStatusStore = Arc<RwLock<HashMap<String, WhodStatusUpdate>>>;
|
||||
pub type RwhodStatusStore = Arc<RwLock<RwhodStatusRegistry>>;
|
||||
|
||||
Reference in New Issue
Block a user