Skip to content

Commit

Permalink
don't disable NTCP2 address if Yggdrasil address is presented
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Feb 7, 2021
1 parent 1bc3de8 commit 3b32da4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions daemon/Daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ namespace util
i2p::context.PublishNTCP2Address (port, false); // unpublish
}
if (ygg)
{
if (!ntcp2)
i2p::context.PublishNTCP2Address (port, true);
i2p::context.UpdateNTCP2V6Address (yggaddr);
}

bool transit; i2p::config::GetOption("notransit", transit);
i2p::context.SetAcceptsTunnels (!transit);
Expand Down
3 changes: 2 additions & 1 deletion libi2pd/RouterContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,8 @@ namespace i2p

// read NTCP2
bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2);
if (ntcp2)
bool ygg; i2p::config::GetOption("meshnets.yggdrasil", ygg);
if (ntcp2 || ygg)
{
if (!m_NTCP2Keys) NewNTCP2Keys ();
UpdateNTCP2Address (true); // enable NTCP2
Expand Down

0 comments on commit 3b32da4

Please sign in to comment.