mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
check Charlie's address for PeerTest msg 4
This commit is contained in:
parent
c3c5c7ae63
commit
38e43bc9c8
@ -358,7 +358,7 @@ namespace transport
|
||||
}
|
||||
default:
|
||||
{
|
||||
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type);
|
||||
LogPrint (eLogWarning, "SSU2: Unexpected message type ", (int)header.h.type, " from ", m_RemoteEndpoint);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1604,17 +1604,24 @@ namespace transport
|
||||
it->second.first->SetRemoteIdentity (r->GetIdentity ());
|
||||
auto addr = r->GetSSU2Address (m_Address->IsV4 ());
|
||||
if (addr)
|
||||
{
|
||||
it->second.first->m_Address = addr;
|
||||
if (it->second.first->m_State == eSSU2SessionStatePeerTestReceived)
|
||||
{
|
||||
// msg 5 already received. send msg 6
|
||||
it->second.first->m_State = eSSU2SessionStatePeerTest;
|
||||
it->second.first->SendPeerTest (6, buf + offset, len - offset, addr->i);
|
||||
if (it->second.first->m_State == eSSU2SessionStatePeerTestReceived)
|
||||
{
|
||||
// msg 5 already received. send msg 6
|
||||
it->second.first->m_State = eSSU2SessionStatePeerTest;
|
||||
it->second.first->SendPeerTest (6, buf + offset, len - offset, addr->i);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogPrint (eLogWarning, "SSU2: Peer test 4 address not found");
|
||||
it->second.first->Terminate ();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogPrint (eLogInfo, "SSU2: Peer test 4 signature verification failed");
|
||||
LogPrint (eLogWarning, "SSU2: Peer test 4 signature verification failed");
|
||||
it->second.first->Terminate ();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user