mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-22 19:41:41 +00:00
ignore zero length packets
This commit is contained in:
1 parent
4c2f403740
commit
180fbcdac6
1 file changed
+3
-2
@@ -87,7 +87,8 @@ namespace ssu
|
||||
{
|
||||
if (m_State == eSessionStateEstablished)
|
||||
ScheduleTermination ();
|
||||
|
||||
|
||||
if (!len) return; // ignore zero-length packets
|
||||
if (m_IsSessionKey && Validate (buf, len, m_MacKey)) // try session key first
|
||||
DecryptSessionKey (buf, len);
|
||||
else
|
||||
@@ -820,7 +821,7 @@ namespace ssu
|
||||
// encrypt message with session key
|
||||
FillHeaderAndEncrypt (PAYLOAD_TYPE_SESSION_DESTROYED, buf, 48);
|
||||
Send (buf, 48);
|
||||
LogPrint ("SSU session destoryed sent");
|
||||
LogPrint ("SSU session destroyed sent");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user