create tunnel I2NP message for tunnel data

This commit is contained in:
orignal 2021-10-18 19:03:08 -04:00
parent 197882a4c9
commit 278fd2d8d5

View File

@ -176,7 +176,8 @@ namespace transport
if (it == m_IncompleteMessages.end ()) if (it == m_IncompleteMessages.end ())
{ {
// create new message // create new message
auto msg = NewI2NPShortMessage (); auto msg = (!fragmentNum && fragmentSize > 0 && buf[I2NP_SHORT_HEADER_TYPEID_OFFSET] == eI2NPTunnelData) ?
NewI2NPTunnelMessage (true) : NewI2NPShortMessage ();
msg->len -= I2NP_SHORT_HEADER_SIZE; msg->len -= I2NP_SHORT_HEADER_SIZE;
it = m_IncompleteMessages.insert (std::make_pair (msgID, it = m_IncompleteMessages.insert (std::make_pair (msgID,
m_Session.GetServer ().GetIncompleteMessagesPool ().AcquireShared (msg))).first; m_Session.GetServer ().GetIncompleteMessagesPool ().AcquireShared (msg))).first;