From 94a6d132dc20603286374086031c92e4871f6cb8 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 6 Nov 2026 10:24:11 +0800 Subject: [PATCH] Keep the client session while a signed hello replaces it A client that re-signs its session dropped it first, so until the new welcome came back pushes under the old key could not open and a plaintext push was taken even from a server that seals every push. ClientSeal::hello builds a hello without touching the session; the welcome replaces it as before. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8 --- src/udp_seal.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/udp_seal.rs b/src/udp_seal.rs index 2e0bd47e2..7f3257a44 100644 --- a/src/udp_seal.rs +++ b/src/udp_seal.rs @@ -504,6 +504,11 @@ impl ClientSeal { s.next_pn += 1; return seal_data(&s.key, KIND_TO_SERVER, s.key_id, pn, payload); } + self.hello(payload) + } + + /// A fresh hello even under a session, which stays in use until the welcome replaces it. + pub fn hello(&mut self, payload: &[u8]) -> Option> { let now = SystemTime::now() .duration_since(UNIX_EPOCH) .map_or(0, |d| d.as_millis() as u64);