Browse Source

compare published address and actual endpoint

pull/1872/head
orignal 2 years ago
parent
commit
f1415c2234
  1. 6
      libi2pd/SSU2Session.cpp

6
libi2pd/SSU2Session.cpp

@ -1047,6 +1047,12 @@ namespace transport
LogPrint (eLogError, "SSU2: No SSU2 address with static key found in SessionConfirmed from ", i2p::data::GetIdentHashAbbreviation (ri->GetIdentHash ())); LogPrint (eLogError, "SSU2: No SSU2 address with static key found in SessionConfirmed from ", i2p::data::GetIdentHashAbbreviation (ri->GetIdentHash ()));
return false; return false;
} }
if (m_Address->published && m_RemoteEndpoint.address () != m_Address->host)
{
LogPrint (eLogError, "SSU2: Host mismatch between published address ", m_Address->host,
" and actual enpoint ", m_RemoteEndpoint.address (), " from ", i2p::data::GetIdentHashAbbreviation (ri->GetIdentHash ()));
return false;
}
// update RouterInfo in netdb // update RouterInfo in netdb
ri = i2p::data::netdb.AddRouterInfo (ri->GetBuffer (), ri->GetBufferLen ()); // ri points to one from netdb now ri = i2p::data::netdb.AddRouterInfo (ri->GetBuffer (), ri->GetBufferLen ()); // ri points to one from netdb now
if (!ri) if (!ri)

Loading…
Cancel
Save