mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
generate new tags based on last received index
This commit is contained in:
parent
6fb80f226a
commit
fe9ac10f02
@ -402,8 +402,7 @@ namespace garlic
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
HandlePayload (payload.data (), len - 16);
|
HandlePayload (payload.data (), len - 16);
|
||||||
if (m_NumReceiveTags > 0)m_NumReceiveTags--;
|
if (m_ReceiveTagset.GetNextIndex () - index <= GetOwner ()->GetNumTags ()*2/3)
|
||||||
if (m_NumReceiveTags <= GetOwner ()->GetNumTags ()*2/3)
|
|
||||||
GenerateMoreReceiveTags (GetOwner ()->GetNumTags ());
|
GenerateMoreReceiveTags (GetOwner ()->GetNumTags ());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -570,7 +569,6 @@ namespace garlic
|
|||||||
uint64_t tag = m_ReceiveTagset.GetNextSessionTag ();
|
uint64_t tag = m_ReceiveTagset.GetNextSessionTag ();
|
||||||
GetOwner ()->AddECIESx25519SessionTag (index, tag, shared_from_this ());
|
GetOwner ()->AddECIESx25519SessionTag (index, tag, shared_from_this ());
|
||||||
}
|
}
|
||||||
m_NumReceiveTags += numTags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ECIESX25519AEADRatchetSession::CheckExpired (uint64_t ts)
|
bool ECIESX25519AEADRatchetSession::CheckExpired (uint64_t ts)
|
||||||
|
@ -119,7 +119,6 @@ namespace garlic
|
|||||||
SessionState m_State = eSessionStateNew;
|
SessionState m_State = eSessionStateNew;
|
||||||
uint64_t m_LastActivityTimestamp = 0; // incoming
|
uint64_t m_LastActivityTimestamp = 0; // incoming
|
||||||
RatchetTagSet m_SendTagset, m_ReceiveTagset;
|
RatchetTagSet m_SendTagset, m_ReceiveTagset;
|
||||||
int m_NumReceiveTags = 0;
|
|
||||||
std::unique_ptr<i2p::data::IdentHash> m_Destination;// TODO: might not need it
|
std::unique_ptr<i2p::data::IdentHash> m_Destination;// TODO: might not need it
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user