mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
take UDP address from actual endpoint
This commit is contained in:
2
SSU.cpp
2
SSU.cpp
@@ -134,7 +134,7 @@ namespace ssu
|
|||||||
uint8_t * payload = buf + sizeof (SSUHeader);
|
uint8_t * payload = buf + sizeof (SSUHeader);
|
||||||
memcpy (payload, i2p::context.GetRouterIdentity ().publicKey, 256);
|
memcpy (payload, i2p::context.GetRouterIdentity ().publicKey, 256);
|
||||||
payload[256] = 4; // we assume ipv4
|
payload[256] = 4; // we assume ipv4
|
||||||
*(uint32_t *)(payload + 257) = htobe32 (address->host.to_v4 ().to_ulong ());
|
*(uint32_t *)(payload + 257) = htobe32 (m_RemoteEndpoint.address ().to_v4 ().to_ulong ());
|
||||||
|
|
||||||
uint8_t iv[16];
|
uint8_t iv[16];
|
||||||
CryptoPP::RandomNumberGenerator& rnd = i2p::context.GetRandomNumberGenerator ();
|
CryptoPP::RandomNumberGenerator& rnd = i2p::context.GetRandomNumberGenerator ();
|
||||||
|
|||||||
Reference in New Issue
Block a user