diff --git a/libi2pd/RouterContext.cpp b/libi2pd/RouterContext.cpp index 0d3c707b..9c1acfcc 100644 --- a/libi2pd/RouterContext.cpp +++ b/libi2pd/RouterContext.cpp @@ -173,6 +173,7 @@ namespace i2p if (address->IsNTCP2 () && (address->port != port || address->ntcp2->isPublished != publish)) { address->port = port; + address->cost = publish ? 3 : 14; address->ntcp2->isPublished = publish; address->ntcp2->iv = m_NTCP2Keys->iv; updated = true; diff --git a/libi2pd/RouterInfo.cpp b/libi2pd/RouterInfo.cpp index d2bfc7ce..de7cd0be 100644 --- a/libi2pd/RouterInfo.cpp +++ b/libi2pd/RouterInfo.cpp @@ -700,7 +700,7 @@ namespace data addr->host = host; addr->port = port; addr->transportStyle = eTransportNTCP; - addr->cost = 3; + addr->cost = port ? 3 : 14; // override from RouterContext::PublishNTCP2Address addr->date = 0; addr->ntcp2.reset (new NTCP2Ext ()); addr->ntcp2->isNTCP2Only = true; // NTCP2 only address