Browse Source

set correct IV when NTCP2 address gets published

pull/1229/head
orignal 6 years ago
parent
commit
d9476fb5ca
  1. 2
      libi2pd/RouterContext.cpp

2
libi2pd/RouterContext.cpp

@ -164,6 +164,7 @@ namespace i2p @@ -164,6 +164,7 @@ namespace i2p
void RouterContext::PublishNTCP2Address (int port, bool publish)
{
if (!m_NTCP2Keys) return;
if (!port)
port = rand () % (30777 - 9111) + 9111; // I2P network ports range
bool updated = false;
@ -173,6 +174,7 @@ namespace i2p @@ -173,6 +174,7 @@ namespace i2p
{
address->port = port;
address->ntcp2->isPublished = publish;
address->ntcp2->iv = m_NTCP2Keys->iv;
updated = true;
}
}

Loading…
Cancel
Save