increment sequence number so we don't spam new intro frames

pull/18/head
Jeff Becker 6 years ago
parent ed4ccd7015
commit c9bfe640b7
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -936,6 +936,8 @@ namespace llarp
const byte_t* K = nullptr;
for(const auto& tag : tags)
{
if(tag.IsZero())
continue;
if(p == nullptr && GetIntroFor(tag, remoteIntro))
{
if(!remoteIntro.ExpiresSoon(now))
@ -1211,9 +1213,12 @@ namespace llarp
llarp::LogWarn("no good path yet, your message may drop");
}
}
++sequenceNo;
routing::PathTransferMessage transfer(msg, remoteIntro.pathID);
if(path->SendRoutingMessage(&transfer, m_Endpoint->Router()))
{
lastGoodSend = now;
}
else
llarp::LogError("Failed to send frame on path");
}
@ -1369,6 +1374,7 @@ namespace llarp
m.introReply = path->intro;
m.sender = m_Endpoint->m_Identity.pub;
m.PutBuffer(payload);
m.tag = f.T;
if(!f.EncryptAndSign(&crypto, m, shared, m_Endpoint->m_Identity))
{

@ -314,6 +314,7 @@ namespace llarp
{
if(T.IsZero())
{
llarp::LogInfo("Got protocol frame with new convo");
ProtocolMessage* msg = new ProtocolMessage();
msg->srcPath = srcPath;
// we need to dh

Loading…
Cancel
Save