mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 11:04:00 +01:00
send ack for retransmitted SessionConfirmed
This commit is contained in:
parent
c50e453af6
commit
b0d962b49a
|
@ -668,7 +668,7 @@ namespace transport
|
||||||
header.ll[1] ^= CreateHeaderMask (kh2, buf + (len - 12));
|
header.ll[1] ^= CreateHeaderMask (kh2, buf + (len - 12));
|
||||||
if (header.h.type != eSSU2SessionConfirmed)
|
if (header.h.type != eSSU2SessionConfirmed)
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type);
|
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type, " instead ", (int)eSSU2SessionConfirmed);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// check if fragmented
|
// check if fragmented
|
||||||
|
@ -886,7 +886,7 @@ namespace transport
|
||||||
header.ll[1] ^= CreateHeaderMask (m_Address->i, buf + (len - 12));
|
header.ll[1] ^= CreateHeaderMask (m_Address->i, buf + (len - 12));
|
||||||
if (header.h.type != eSSU2Retry)
|
if (header.h.type != eSSU2Retry)
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type);
|
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type, " instead ", (int)eSSU2Retry);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uint8_t nonce[12] = {0};
|
uint8_t nonce[12] = {0};
|
||||||
|
@ -962,7 +962,7 @@ namespace transport
|
||||||
header.ll[1] ^= CreateHeaderMask (i2p::context.GetSSU2IntroKey (), buf + (len - 12));
|
header.ll[1] ^= CreateHeaderMask (i2p::context.GetSSU2IntroKey (), buf + (len - 12));
|
||||||
if (header.h.type != eSSU2HolePunch)
|
if (header.h.type != eSSU2HolePunch)
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type);
|
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type, " instead ", (int)eSSU2HolePunch);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uint8_t nonce[12] = {0};
|
uint8_t nonce[12] = {0};
|
||||||
|
@ -1044,7 +1044,7 @@ namespace transport
|
||||||
header.ll[1] ^= CreateHeaderMask (i2p::context.GetSSU2IntroKey (), buf + (len - 12));
|
header.ll[1] ^= CreateHeaderMask (i2p::context.GetSSU2IntroKey (), buf + (len - 12));
|
||||||
if (header.h.type != eSSU2PeerTest)
|
if (header.h.type != eSSU2PeerTest)
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type);
|
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type, " instead ", (int)eSSU2PeerTest);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
uint8_t nonce[12] = {0};
|
uint8_t nonce[12] = {0};
|
||||||
|
@ -1100,7 +1100,8 @@ namespace transport
|
||||||
header.ll[1] ^= CreateHeaderMask (m_KeyDataReceive + 32, buf + (len - 12));
|
header.ll[1] ^= CreateHeaderMask (m_KeyDataReceive + 32, buf + (len - 12));
|
||||||
if (header.h.type != eSSU2Data)
|
if (header.h.type != eSSU2Data)
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type);
|
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type, " instead ", (int)eSSU2Data);
|
||||||
|
SendQuickAck (); // in case it was SessionConfirmed
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uint8_t payload[SSU2_MTU];
|
uint8_t payload[SSU2_MTU];
|
||||||
|
|
Loading…
Reference in a new issue