mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
don't send invalid local address in RelayRequest
This commit is contained in:
parent
dc4cd34893
commit
34f1ba5bd9
|
@ -170,7 +170,12 @@ namespace transport
|
|||
if (!session || !relayTag) return false;
|
||||
// find local address to introduce
|
||||
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
|
||||
uint32_t nonce;
|
||||
RAND_bytes ((uint8_t *)&nonce, 4);
|
||||
|
|
Loading…
Reference in a new issue