mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
require ipv4 for IBGW
This commit is contained in:
parent
727743979c
commit
2783337284
1 changed files with 3 additions and 4 deletions
|
@ -422,7 +422,7 @@ namespace tunnel
|
||||||
{
|
{
|
||||||
auto r = i2p::transport::transports.GetRandomPeer ();
|
auto r = i2p::transport::transports.GetRandomPeer ();
|
||||||
if (r && !r->GetProfile ()->IsBad () &&
|
if (r && !r->GetProfile ()->IsBad () &&
|
||||||
(numHops > 1 || (!inbound && r->IsV4 ()) || r->IsReachable ())) // first inbound must be reachable
|
(numHops > 1 || (r->IsV4 () && (!inbound || r->IsReachable ())))) // first inbound must be reachable
|
||||||
{
|
{
|
||||||
prevHop = r;
|
prevHop = r;
|
||||||
peers.push_back (r->GetRouterIdentity ());
|
peers.push_back (r->GetRouterIdentity ());
|
||||||
|
@ -443,9 +443,8 @@ namespace tunnel
|
||||||
LogPrint (eLogError, "Tunnels: Can't select next hop for ", prevHop->GetIdentHashBase64 ());
|
LogPrint (eLogError, "Tunnels: Can't select next hop for ", prevHop->GetIdentHashBase64 ());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ((i == numHops - 1) &&
|
if ((i == numHops - 1) && (!hop->IsV4 () || // doesn't support ipv4
|
||||||
((inbound && !hop->IsReachable ()) || // IBGW is not reachable
|
(inbound && !hop->IsReachable ()))) // IBGW is not reachable
|
||||||
(!inbound && !hop->IsV4 ()))) // OBEP is not ipv4
|
|
||||||
{
|
{
|
||||||
auto hop1 = nextHop (prevHop, true);
|
auto hop1 = nextHop (prevHop, true);
|
||||||
if (hop1) hop = hop1;
|
if (hop1) hop = hop1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue