mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-19 22:01:49 +02:00
doesn't send peer test to a reserved address
This commit is contained in:
parent
9e050d1a23
commit
3695aa924b
2 changed files with 23 additions and 15 deletions
libi2pd
|
@ -593,12 +593,16 @@ namespace transport
|
|||
auto router = i2p::data::netdb.GetRandomPeerTestRouter (true); // v4
|
||||
if (router)
|
||||
{
|
||||
if (!statusChanged)
|
||||
auto addr = router->GetSSUAddress (true); // ipv4
|
||||
if (addr && !i2p::util::net::IsInReservedRange(addr->host))
|
||||
{
|
||||
statusChanged = true;
|
||||
i2p::context.SetStatus (eRouterStatusTesting); // first time only
|
||||
}
|
||||
m_SSUServer->CreateSession (router, true, true); // peer test v4
|
||||
if (!statusChanged)
|
||||
{
|
||||
statusChanged = true;
|
||||
i2p::context.SetStatus (eRouterStatusTesting); // first time only
|
||||
}
|
||||
m_SSUServer->CreateSession (router, addr, true); // peer test v4
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!statusChanged)
|
||||
|
@ -614,7 +618,7 @@ namespace transport
|
|||
if (router)
|
||||
{
|
||||
auto addr = router->GetSSUV6Address ();
|
||||
if (addr)
|
||||
if (addr && !i2p::util::net::IsInReservedRange(addr->host))
|
||||
{
|
||||
if (!statusChanged)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue