From eff67f11596fb818cfe24e10867c5e39308298f0 Mon Sep 17 00:00:00 2001 From: JackDoan Date: Wed, 14 Oct 2026 15:37:53 -0500 Subject: [PATCH] Size the buffer of a hybrid confirmation for an empty reply, not the mtu --- handshake_manager_hybrid.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/handshake_manager_hybrid.go b/handshake_manager_hybrid.go index f6381e49..2abb776a 100644 --- a/handshake_manager_hybrid.go +++ b/handshake_manager_hybrid.go @@ -303,7 +303,10 @@ func (hm *HandshakeManager) completeHybridResponder(via ViaSender, hh *Handshake } func (hm *HandshakeManager) sendHybridConfirmation(hostinfo *HostInfo) { - hm.f.send(header.Test, header.TestReply, hostinfo.ConnectionState, hostinfo, []byte{}, make([]byte, 12, 12), make([]byte, mtu)) + // The reply is empty, so even relayed it is just two headers and two tags. + cs := hostinfo.ConnectionState + out := make([]byte, 2*(header.Len+cs.eKey.Overhead())) + hm.f.send(header.Test, header.TestReply, cs, hostinfo, []byte{}, make([]byte, 12, 12), out) } // reconfirmHybrid answers a msg3 for a hybrid tunnel this responder already