fix(server): reject unusable timestamp sessions

This commit is contained in:
Nils Andreas Svee committed 2026-08-12 17:21:23 +07:00
1 parent 68ed5c6e2e
commit ca2c3dcbd8
5 files changed
+169 -6

No files matched your search

+6
View File
@@ -18,6 +18,12 @@ use crate::config::ServerConfig;
/// timestamp allowance, DSCP policy and server-fill allow-list. This function
/// is where they belong, which is why the configuration is threaded through
/// even though no knob reads it yet.
///
/// Negotiation rewriting nothing but the version does not mean every open is
/// answered: the core validates what this function returns and silently
/// discards an open whose effective parameters it could not execute. That is a
/// separate step on purpose — this function decides what the session *would*
/// be, and the core decides whether that session can exist.
pub(crate) fn negotiate_params(mut requested: Params, _config: &ServerConfig) -> Params {
requested.protocol_version = PROTOCOL_VERSION;
requested