Browse Source

create I2NP tunnel message for first fragment

pull/1905/head
orignal 2 years ago
parent
commit
5ad9c8e740
  1. 2
      libi2pd/SSU2Session.cpp

2
libi2pd/SSU2Session.cpp

@ -1766,8 +1766,8 @@ namespace transport
void SSU2Session::HandleFirstFragment (const uint8_t * buf, size_t len) 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); uint32_t msgID; memcpy (&msgID, buf + 1, 4);
auto msg = NewI2NPShortMessage ();
// same format as I2NP message block // same format as I2NP message block
msg->len = msg->offset + len + 7; msg->len = msg->offset + len + 7;
memcpy (msg->GetNTCP2Header (), buf, len); memcpy (msg->GetNTCP2Header (), buf, len);

Loading…
Cancel
Save