mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
take UDP address from actual endpoint
This commit is contained in:
parent
5ecf67591d
commit
135b3f1477
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 ();
|
||||||
|
Loading…
Reference in New Issue
Block a user