Session idle timeout now based on application data only

MMP reports (SenderReport, ReceiverReport, PathMtuNotification) were
resetting the idle timer on both RX and TX paths, preventing sessions
from ever timing out when MMP traffic kept flowing. Changed touch() to
only be called for DataPacket send/receive and session establishment,
so sessions with no application data tear down after the idle timeout
even with active MMP measurement traffic.
This commit is contained in:
Johnathan Corgan
2026-02-19 03:40:58 +00:00
parent 04d9fd625d
commit c5c7e68a6e
5 changed files with 53 additions and 11 deletions
+7 -2
View File
@@ -54,7 +54,9 @@ pub(crate) struct SessionEntry {
/// When the session was created (Unix milliseconds).
#[cfg_attr(not(test), allow(dead_code))]
created_at: u64,
/// Last activity timestamp (Unix milliseconds).
/// Last application data activity timestamp (Unix milliseconds).
/// Only updated for DataPacket send/receive and session establishment.
/// MMP reports do not update this field. Used for idle session timeout.
last_activity: u64,
/// When the session transitioned to Established (Unix milliseconds).
/// Used to compute session-relative timestamps for the FSP inner header.
@@ -116,7 +118,10 @@ impl SessionEntry {
self.state.take()
}
/// Update the last activity timestamp.
/// Update the last application data activity timestamp.
///
/// Only call for DataPacket send/receive and session establishment,
/// not for MMP reports. Used by the idle session timeout.
pub(crate) fn touch(&mut self, now_ms: u64) {
self.last_activity = now_ms;
}