From ca4414d15afe1be65997bbb99b3b73fb67214c71 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 8 Jul 2022 13:52:09 -0400 Subject: [PATCH] request relay tag if firewalled --- libi2pd/SSU2Session.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libi2pd/SSU2Session.cpp b/libi2pd/SSU2Session.cpp index a47677fe..7041aad9 100644 --- a/libi2pd/SSU2Session.cpp +++ b/libi2pd/SSU2Session.cpp @@ -406,6 +406,13 @@ namespace transport htobe16buf (payload + 1, 4); htobe32buf (payload + 3, ts); size_t payloadSize = 7; + if (GetRouterStatus () == eRouterStatusFirewalled) + { + // relay tag request + payload[payloadSize] = eSSU2BlkRelayTagRequest; + memset (payload + payloadSize + 1, 0, 2); // size = 0 + payloadSize += 3; + } payloadSize += CreatePaddingBlock (payload + payloadSize, 40 - payloadSize, 1); // KDF for session request m_NoiseState->MixHash ({ {header.buf, 16}, {headerX, 16} }); // h = SHA256(h || header)