create I2NP tunnel message for first fragment

This commit is contained in:
orignal 2023-03-13 19:19:57 -04:00
parent e96f0bfb14
commit 5ad9c8e740

View File

@ -1766,8 +1766,8 @@ namespace transport
void SSU2Session::HandleFirstFragment (const uint8_t * buf, size_t len)
{
auto msg = (buf[0] == eI2NPTunnelData) ? NewI2NPTunnelMessage (true) : NewI2NPShortMessage ();
uint32_t msgID; memcpy (&msgID, buf + 1, 4);
auto msg = NewI2NPShortMessage ();
// same format as I2NP message block
msg->len = msg->offset + len + 7;
memcpy (msg->GetNTCP2Header (), buf, len);