mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-10 00:26:59 +00:00
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:
+7
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user