|
|
@ -1585,6 +1585,7 @@ namespace llarp
|
|
|
|
self->handler->PutCachedSessionKeyFor(self->msg.tag, self->sharedKey);
|
|
|
|
self->handler->PutCachedSessionKeyFor(self->msg.tag, self->sharedKey);
|
|
|
|
self->handler->PutIntroFor(self->msg.tag, self->remoteIntro);
|
|
|
|
self->handler->PutIntroFor(self->msg.tag, self->remoteIntro);
|
|
|
|
self->handler->PutSenderFor(self->msg.tag, self->remote);
|
|
|
|
self->handler->PutSenderFor(self->msg.tag, self->remote);
|
|
|
|
|
|
|
|
self->handler->PutReplyIntroFor(self->msg.tag, self->msg.introReply);
|
|
|
|
self->hook(self->frame);
|
|
|
|
self->hook(self->frame);
|
|
|
|
delete self;
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1671,24 +1672,22 @@ namespace llarp
|
|
|
|
|
|
|
|
|
|
|
|
ex->msg.PutBuffer(payload);
|
|
|
|
ex->msg.PutBuffer(payload);
|
|
|
|
ex->msg.introReply = path->intro;
|
|
|
|
ex->msg.introReply = path->intro;
|
|
|
|
m_DataHandler->PutReplyIntroFor(currentConvoTag, path->intro);
|
|
|
|
ex->frame.F = ex->msg.introReply.pathID;
|
|
|
|
llarp_threadpool_queue_job(m_Endpoint->Worker(),
|
|
|
|
llarp_threadpool_queue_job(m_Endpoint->Worker(),
|
|
|
|
{ex, &AsyncKeyExchange::Encrypt});
|
|
|
|
{ex, &AsyncKeyExchange::Encrypt});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
bool
|
|
|
|
Endpoint::SendContext::Send(ProtocolFrame& msg)
|
|
|
|
Endpoint::SendContext::Send(const ProtocolFrame& msg)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto path = m_PathSet->GetPathByRouter(remoteIntro.router);
|
|
|
|
auto path = m_PathSet->GetByEndpointWithID(remoteIntro.router, msg.F);
|
|
|
|
if(path == nullptr)
|
|
|
|
|
|
|
|
path = m_Endpoint->GetPathByRouter(remoteIntro.router);
|
|
|
|
|
|
|
|
if(path)
|
|
|
|
if(path)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const routing::PathTransferMessage transfer(msg, remoteIntro.pathID);
|
|
|
|
const routing::PathTransferMessage transfer(msg, remoteIntro.pathID);
|
|
|
|
if(path->SendRoutingMessage(&transfer, m_Endpoint->Router()))
|
|
|
|
if(path->SendRoutingMessage(&transfer, m_Endpoint->Router()))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
llarp::LogDebug("sent data to ", remoteIntro.pathID, " on ",
|
|
|
|
llarp::LogInfo("sent intro to ", remoteIntro.pathID, " on ",
|
|
|
|
remoteIntro.router, " seqno=", sequenceNo);
|
|
|
|
remoteIntro.router, " seqno=", sequenceNo);
|
|
|
|
lastGoodSend = m_Endpoint->Now();
|
|
|
|
lastGoodSend = m_Endpoint->Now();
|
|
|
|
++sequenceNo;
|
|
|
|
++sequenceNo;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|