rwhod: warn incoming packets with weird timestamp orders
Build and test / check (push) Failing after 1m8s
Build and test / build (push) Successful in 1m38s
Build and test / test (push) Successful in 2m13s
Build and test / docs (push) Successful in 4m20s

This commit is contained in:
2026-06-23 18:13:29 +09:00
parent c4dac9fcc9
commit 5acbe528c8
+18
View File
@@ -42,6 +42,24 @@ pub async fn rwhod_packet_receiver_task(
Ok(status_update) => {
tracing::debug!("Processed whod packet from {src}: {:?}", status_update);
if status_update.boot_time > status_update.sendtime {
tracing::warn!(
"Received whod packet from {src} with boot time {} after send time {}",
status_update.boot_time,
status_update.sendtime
);
}
if let Some(recvtime) = status_update.recvtime
&& recvtime < status_update.sendtime
{
tracing::warn!(
"Received whod packet from {src} with recv time {} before send time {}",
recvtime,
status_update.sendtime
);
}
let mut store = whod_status_store.write().await;
store.insert(status_update.hostname.clone(), status_update);
}