always lookup SSU session if peer's endpoint doesn't match

This commit is contained in:
orignal 2019-04-25 12:54:44 -04:00
parent 1bfb9b02f5
commit 5e42947fbd
3 changed files with 12 additions and 15 deletions

View file

@ -158,7 +158,7 @@ namespace transport
ProcessData (buf + headerSize, len - headerSize);
break;
case PAYLOAD_TYPE_SESSION_REQUEST:
ProcessSessionRequest (buf, len, senderEndpoint); // buf with header
ProcessSessionRequest (buf, len); // buf with header
break;
case PAYLOAD_TYPE_SESSION_CREATED:
ProcessSessionCreated (buf, len); // buf with header
@ -194,7 +194,7 @@ namespace transport
}
}
void SSUSession::ProcessSessionRequest (const uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint)
void SSUSession::ProcessSessionRequest (const uint8_t * buf, size_t len)
{
LogPrint (eLogDebug, "SSU message: session request");
bool sendRelayTag = true;
@ -215,7 +215,6 @@ namespace transport
LogPrint (eLogError, "Session request header size ", headerSize, " exceeds packet length ", len);
return;
}
m_RemoteEndpoint = senderEndpoint;
if (!m_DHKeysPair)
m_DHKeysPair = transports.GetNextDHKeysPair ();
CreateAESandMacKey (buf + headerSize);