mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 04:46:38 +01:00
fixed #624. correct v6 address size
This commit is contained in:
parent
f2893097a7
commit
8cb69c1482
1 changed files with 2 additions and 2 deletions
|
@ -991,7 +991,7 @@ namespace transport
|
||||||
else // v6
|
else // v6
|
||||||
{
|
{
|
||||||
boost::asio::ip::address_v6::bytes_type bytes;
|
boost::asio::ip::address_v6::bytes_type bytes;
|
||||||
memcpy (bytes.data (), address, 6);
|
memcpy (bytes.data (), address, 16);
|
||||||
addr = boost::asio::ip::address_v6 (bytes);
|
addr = boost::asio::ip::address_v6 (bytes);
|
||||||
}
|
}
|
||||||
SendPeerTest (nonce, addr, be16toh (port), introKey); // to Alice with her address received from Bob
|
SendPeerTest (nonce, addr, be16toh (port), introKey); // to Alice with her address received from Bob
|
||||||
|
@ -1033,7 +1033,7 @@ namespace transport
|
||||||
}
|
}
|
||||||
else if (address.is_v6 ())
|
else if (address.is_v6 ())
|
||||||
{
|
{
|
||||||
*payload = 6;
|
*payload = 16;
|
||||||
memcpy (payload + 1, address.to_v6 ().to_bytes ().data (), 16); // our IP V6
|
memcpy (payload + 1, address.to_v6 ().to_bytes ().data (), 16); // our IP V6
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue