mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
don't send peer test for unknown address/port
This commit is contained in:
@@ -1970,7 +1970,11 @@ namespace transport
|
|||||||
size_t SSU2Session::CreatePeerTestBlock (uint8_t * buf, size_t len, uint32_t nonce)
|
size_t SSU2Session::CreatePeerTestBlock (uint8_t * buf, size_t len, uint32_t nonce)
|
||||||
{
|
{
|
||||||
auto localAddress = FindLocalAddress ();
|
auto localAddress = FindLocalAddress ();
|
||||||
if (!localAddress) return 0;
|
if (!localAddress || !localAddress->port || localAddress->host.is_unspecified ())
|
||||||
|
{
|
||||||
|
LogPrint (eLogWarning, "SSU2: Can't find local address for peer test");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
// signed data
|
// signed data
|
||||||
auto ts = i2p::util::GetSecondsSinceEpoch ();
|
auto ts = i2p::util::GetSecondsSinceEpoch ();
|
||||||
uint8_t signedData[96];
|
uint8_t signedData[96];
|
||||||
|
|||||||
Reference in New Issue
Block a user