mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
correct check of ipv4/ipv6 address
This commit is contained in:
parent
e412b17f70
commit
bce6685d0c
2 changed files with 24 additions and 10 deletions
|
@ -484,7 +484,7 @@ namespace i2p
|
|||
addr->ssu->introducers.clear ();
|
||||
port = addr->port;
|
||||
}
|
||||
// unpiblish NTCP2 addreeses
|
||||
// unpublish NTCP2 addreeses
|
||||
bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2);
|
||||
if (ntcp2)
|
||||
PublishNTCP2Address (port, false, v4, v6, false);
|
||||
|
@ -677,7 +677,7 @@ namespace i2p
|
|||
if (addr->IsPublishedNTCP2 ())
|
||||
{
|
||||
bool isYgg1 = i2p::util::net::IsYggdrasilAddress (addr->host);
|
||||
if (addr->host.is_v6 () && ((isYgg && isYgg1) || (!isYgg && !isYgg1)))
|
||||
if (addr->IsV6 () && ((isYgg && isYgg1) || (!isYgg && !isYgg1)))
|
||||
{
|
||||
if (addr->host != host)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue