summaryrefslogtreecommitdiffstats
path: root/src/transport/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 05:54:53 +0100
committertv <tv@krebsco.de>2026-10-26 05:54:53 +0100
commit0b13e180c4dcd38e3ea8ffeecc9e5ebefa023212 (patch)
tree7ab995f1a8d6aed9365bd6eed5fe2625fd56324e /src/transport/mod.rs
parentf00378e8609e0117132d7aab3f4468a1721f52fa (diff)
number handshakes
This prevents late hellos from resetting the session.
Diffstat (limited to 'src/transport/mod.rs')
-rw-r--r--src/transport/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs
index b2ce63f..614ac48 100644
--- a/src/transport/mod.rs
+++ b/src/transport/mod.rs
@@ -256,6 +256,10 @@ pub struct HelloRequest {
/// Random per run of the sender; the reply echoes it.
#[serde(with = "crate::transport::wire::codec::run_id")]
pub run_id: RunId,
+ /// The handshake's number: the sender numbers the handshakes it starts in a run,
+ /// with all peers, from 1. A retry carries the same number, so the recipient resets
+ /// its sync session only for a new handshake, not for every resend or late copy.
+ pub handshake: u32,
}
#[derive(Debug, Clone, Serialize, Deserialize)]