mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 02:54:01 +01:00
pick compatible outbound tunnel for datagrams
This commit is contained in:
parent
fdde197c58
commit
4052b1ea6d
|
@ -371,8 +371,6 @@ namespace datagram
|
||||||
{
|
{
|
||||||
// no current path, make one
|
// no current path, make one
|
||||||
path = std::make_shared<i2p::garlic::GarlicRoutingPath>();
|
path = std::make_shared<i2p::garlic::GarlicRoutingPath>();
|
||||||
path->outboundTunnel = m_LocalDestination->GetTunnelPool()->GetNextOutboundTunnel();
|
|
||||||
if (!path->outboundTunnel) return nullptr;
|
|
||||||
|
|
||||||
if (m_RemoteLeaseSet)
|
if (m_RemoteLeaseSet)
|
||||||
{
|
{
|
||||||
|
@ -386,6 +384,11 @@ namespace datagram
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
auto leaseRouter = i2p::data::netdb.FindRouter (path->remoteLease->tunnelGateway);
|
||||||
|
path->outboundTunnel = m_LocalDestination->GetTunnelPool()->GetNextOutboundTunnel(nullptr,
|
||||||
|
leaseRouter ? leaseRouter->GetCompatibleTransports (false) : (i2p::data::RouterInfo::CompatibleTransports)i2p::data::RouterInfo::eAllTransports);
|
||||||
|
if (!path->outboundTunnel) return nullptr;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue