From 76190ea3652a5fd6e9b5a942858fac98b86bb157 Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 3 Nov 2024 11:25:19 -0500 Subject: [PATCH] don't resend RelayReponse if Alice is older version --- libi2pd/SSU2Session.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libi2pd/SSU2Session.cpp b/libi2pd/SSU2Session.cpp index 58a4a61c..96f38217 100644 --- a/libi2pd/SSU2Session.cpp +++ b/libi2pd/SSU2Session.cpp @@ -1959,8 +1959,12 @@ namespace transport eSSU2RelayResponseCodeBobRelayTagNotFound, nonce, 0, false); packet->payloadSize += CreatePaddingBlock (packet->payload + packet->payloadSize, m_MaxPayloadSize - packet->payloadSize); uint32_t packetNum = SendData (packet->payload, packet->payloadSize); - packet->sendTime = mts; - session->m_SentPackets.emplace (packetNum, packet); + if (m_RemoteVersion >= SSU2_MIN_RELAY_RESPONSE_RESEND_VERSION) + { + // sometimes Alice doesn't ack this RelayResponse in older versions + packet->sendTime = mts; + m_SentPackets.emplace (packetNum, packet); + } return; } if (session->m_RelaySessions.emplace (nonce, std::make_pair (shared_from_this (), mts/1000)).second)