mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-10 01:01:02 +00:00
allow different ports from RelayReponse and HolePunch
This commit is contained in:
parent
39a86ce5c9
commit
08fd32b3bf
@ -428,12 +428,12 @@ namespace transport
|
|||||||
case eSSU2SessionStateIntroduced:
|
case eSSU2SessionStateIntroduced:
|
||||||
if (m_LastSession->GetRemoteEndpoint ().address ().is_unspecified ())
|
if (m_LastSession->GetRemoteEndpoint ().address ().is_unspecified ())
|
||||||
m_LastSession->SetRemoteEndpoint (senderEndpoint);
|
m_LastSession->SetRemoteEndpoint (senderEndpoint);
|
||||||
if (m_LastSession->GetRemoteEndpoint () == senderEndpoint)
|
if (m_LastSession->GetRemoteEndpoint ().address () == senderEndpoint.address ()) // port might be different
|
||||||
m_LastSession->ProcessHolePunch (buf, len);
|
m_LastSession->ProcessHolePunch (buf, len);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogPrint (eLogWarning, "SSU2: HolePunch endpoint ", senderEndpoint,
|
LogPrint (eLogWarning, "SSU2: HolePunch address ", senderEndpoint.address (),
|
||||||
" doesn't match RelayResponse ", m_LastSession->GetRemoteEndpoint ());
|
" doesn't match RelayResponse ", m_LastSession->GetRemoteEndpoint ().address ());
|
||||||
m_LastSession->Done ();
|
m_LastSession->Done ();
|
||||||
m_LastSession = nullptr;
|
m_LastSession = nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user