mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-29 12:17:49 +02:00
return relay tag for ipv6 introducer
This commit is contained in:
parent
5cca5472e6
commit
25eae3c116
4 changed files with 10 additions and 11 deletions
|
@ -212,7 +212,7 @@ namespace transport
|
|||
{
|
||||
uint8_t extendedOptionsLen = buf[headerSize];
|
||||
headerSize++;
|
||||
if (extendedOptionsLen >= 3) // options are presented
|
||||
if (extendedOptionsLen >= 2) // options are presented
|
||||
{
|
||||
uint16_t flags = bufbe16toh (buf + headerSize);
|
||||
sendRelayTag = flags & EXTENDED_OPTIONS_FLAG_REQUEST_RELAY_TAG;
|
||||
|
@ -464,7 +464,7 @@ namespace transport
|
|||
else
|
||||
s.Insert (address->host.to_v6 ().to_bytes ().data (), 16); // our IP V6
|
||||
s.Insert<uint16_t> (htobe16 (address->port)); // our port
|
||||
if (sendRelayTag && i2p::context.GetRouterInfo ().IsIntroducer () && !IsV6 ())
|
||||
if (sendRelayTag && i2p::context.GetRouterInfo ().IsIntroducer (!IsV6 ()))
|
||||
{
|
||||
RAND_bytes((uint8_t *)&m_SentRelayTag, 4);
|
||||
if (!m_SentRelayTag) m_SentRelayTag = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue