mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
check for published ipv4 addresses for floodfills and IBGW
This commit is contained in:
parent
d580c0155a
commit
caff003a85
3 changed files with 19 additions and 8 deletions
|
@ -498,8 +498,7 @@ namespace tunnel
|
|||
{
|
||||
auto r = i2p::transport::transports.GetRandomPeer (!IsExploratory ());
|
||||
if (r && r->IsECIES () && !r->GetProfile ()->IsBad () &&
|
||||
(numHops > 1 || (r->IsV4 () && (!inbound ||
|
||||
r->IsReachableBy (i2p::data::RouterInfo::eNTCP2V4 | i2p::data::RouterInfo::eSSU2V4))))) // first inbound must be reachable
|
||||
(numHops > 1 || (r->IsV4 () && (!inbound || r->IsPublished (true))))) // first inbound must be published ipv4
|
||||
{
|
||||
prevHop = r;
|
||||
path.Add (r);
|
||||
|
@ -521,8 +520,7 @@ namespace tunnel
|
|||
LogPrint (eLogError, "Tunnels: Can't select next hop for ", prevHop->GetIdentHashBase64 ());
|
||||
return false;
|
||||
}
|
||||
if ((i == numHops - 1) && (!hop->IsV4 () || (inbound && // doesn't support ipv4
|
||||
!hop->IsReachableBy (i2p::data::RouterInfo::eNTCP2V4 | i2p::data::RouterInfo::eSSU2V4)))) // IBGW is not reachable
|
||||
if ((i == numHops - 1) && (!hop->IsV4 () || (inbound && !hop->IsPublished (true)))) // IBGW is not published ipv4
|
||||
{
|
||||
auto hop1 = nextHop (prevHop, true);
|
||||
if (hop1) hop = hop1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue