get unpublished NTCP2 address

This commit is contained in:
orignal 2018-08-04 08:47:58 -04:00
parent 09c6faf923
commit 41b9f19b01
3 changed files with 29 additions and 30 deletions

View file

@ -149,7 +149,7 @@ namespace transport
m_Establisher.reset (new NTCP2Establisher);
if (in_RemoteRouter) // Alice
{
auto addr = in_RemoteRouter->GetNTCP2Address ();
auto addr = in_RemoteRouter->GetNTCP2Address (true); // we need a published address
if (addr)
{
memcpy (m_Establisher->m_RemoteStaticKey, addr->ntcp2->staticKey, 32);
@ -580,7 +580,7 @@ namespace transport
SendTerminationAndTerminate (eNTCP2RouterInfoSignatureVerificationFail);
return;
}
auto addr = ri.GetNTCP2Address ();
auto addr = ri.GetNTCP2Address (false); // any NTCP2 address
if (!addr)
{
LogPrint (eLogError, "NTCP2: No NTCP2 address found in SessionConfirmed");