mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
don't send invalid local address in RelayRequest
This commit is contained in:
@@ -170,7 +170,12 @@ namespace transport
|
|||||||
if (!session || !relayTag) return false;
|
if (!session || !relayTag) return false;
|
||||||
// find local address to introduce
|
// find local address to introduce
|
||||||
auto localAddress = session->FindLocalAddress ();
|
auto localAddress = session->FindLocalAddress ();
|
||||||
if (!localAddress) return false;
|
if (!localAddress || localAddress->host.is_unspecified () || !localAddress->port)
|
||||||
|
{
|
||||||
|
// can't introduce invalid endpoint
|
||||||
|
LogPrint (eLogWarning, "SSU2: Can't find local address to introduce");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// create nonce
|
// create nonce
|
||||||
uint32_t nonce;
|
uint32_t nonce;
|
||||||
RAND_bytes ((uint8_t *)&nonce, 4);
|
RAND_bytes ((uint8_t *)&nonce, 4);
|
||||||
|
|||||||
Reference in New Issue
Block a user