create inbound tunnels per local destination

This commit is contained in:
orignal 2014-03-14 15:13:34 -04:00
parent 7caa46b381
commit cba18faa87
7 changed files with 112 additions and 12 deletions

View file

@ -504,8 +504,14 @@ namespace tunnel
void Tunnels::AddInboundTunnel (InboundTunnel * newTunnel)
{
m_InboundTunnels[newTunnel->GetTunnelID ()] = newTunnel;
// build symmetric outbound tunnel
CreateTunnel<OutboundTunnel> (newTunnel->GetTunnelConfig ()->Invert (), GetNextOutboundTunnel ());
auto pool = newTunnel->GetTunnelPool ();
if (pool)
pool->TunnelCreated (newTunnel);
else
{
// build symmetric outbound tunnel
CreateTunnel<OutboundTunnel> (newTunnel->GetTunnelConfig ()->Invert (), GetNextOutboundTunnel ());
}
}