mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 04:46:38 +01:00
set correct IV when NTCP2 address gets published
This commit is contained in:
parent
9882365ab4
commit
d9476fb5ca
1 changed files with 2 additions and 0 deletions
|
@ -164,6 +164,7 @@ namespace i2p
|
||||||
|
|
||||||
void RouterContext::PublishNTCP2Address (int port, bool publish)
|
void RouterContext::PublishNTCP2Address (int port, bool publish)
|
||||||
{
|
{
|
||||||
|
if (!m_NTCP2Keys) return;
|
||||||
if (!port)
|
if (!port)
|
||||||
port = rand () % (30777 - 9111) + 9111; // I2P network ports range
|
port = rand () % (30777 - 9111) + 9111; // I2P network ports range
|
||||||
bool updated = false;
|
bool updated = false;
|
||||||
|
@ -173,6 +174,7 @@ namespace i2p
|
||||||
{
|
{
|
||||||
address->port = port;
|
address->port = port;
|
||||||
address->ntcp2->isPublished = publish;
|
address->ntcp2->isPublished = publish;
|
||||||
|
address->ntcp2->iv = m_NTCP2Keys->iv;
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue