mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
forward correct RelayResponse from Charlie to Alice
This commit is contained in:
parent
578a15bbe5
commit
c3c5c7ae63
@ -1394,8 +1394,16 @@ namespace transport
|
||||
if (it != m_RelaySessions.end ())
|
||||
{
|
||||
if (it->second.first && it->second.first->IsEstablished ())
|
||||
{
|
||||
// we are Bob, message from Charlie
|
||||
it->second.first->SendData (buf, len); // forward to Alice as is
|
||||
uint8_t payload[SSU2_MAX_PAYLOAD_SIZE];
|
||||
payload[0] = eSSU2BlkRelayResponse;
|
||||
htobe16buf (payload + 1, len);
|
||||
memcpy (payload + 3, buf, len); // forward to Alice as is
|
||||
size_t payloadSize = len + 3;
|
||||
payloadSize += CreatePaddingBlock (payload + payloadSize, SSU2_MAX_PAYLOAD_SIZE - payloadSize);
|
||||
it->second.first->SendData (payload, payloadSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
// we are Alice, message from Bob
|
||||
|
Loading…
Reference in New Issue
Block a user