|
|
@ -785,9 +785,11 @@ namespace i2p |
|
|
|
switch (typeID) |
|
|
|
switch (typeID) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case eI2NPTunnelData: |
|
|
|
case eI2NPTunnelData: |
|
|
|
|
|
|
|
if (!msg->from) |
|
|
|
i2p::tunnel::tunnels.PostTunnelData (msg); |
|
|
|
i2p::tunnel::tunnels.PostTunnelData (msg); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case eI2NPTunnelGateway: |
|
|
|
case eI2NPTunnelGateway: |
|
|
|
|
|
|
|
if (!msg->from) |
|
|
|
i2p::tunnel::tunnels.PostTunnelData (msg); |
|
|
|
i2p::tunnel::tunnels.PostTunnelData (msg); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case eI2NPGarlic: |
|
|
|
case eI2NPGarlic: |
|
|
@ -799,11 +801,19 @@ namespace i2p |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
case eI2NPDatabaseStore: |
|
|
|
case eI2NPDatabaseStore: |
|
|
|
|
|
|
|
// forward to netDb if came directly or through exploratory tunnel as response to our request
|
|
|
|
|
|
|
|
if (!msg->from || !msg->from->GetTunnelPool () || msg->from->GetTunnelPool ()->IsExploratory ()) |
|
|
|
|
|
|
|
i2p::data::netdb.PostI2NPMsg (msg); |
|
|
|
|
|
|
|
break; |
|
|
|
case eI2NPDatabaseSearchReply: |
|
|
|
case eI2NPDatabaseSearchReply: |
|
|
|
case eI2NPDatabaseLookup: |
|
|
|
|
|
|
|
// forward to netDb
|
|
|
|
// forward to netDb
|
|
|
|
i2p::data::netdb.PostI2NPMsg (msg); |
|
|
|
i2p::data::netdb.PostI2NPMsg (msg); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case eI2NPDatabaseLookup: |
|
|
|
|
|
|
|
// forward to netDb if floodfill and came directly
|
|
|
|
|
|
|
|
if (!msg->from && i2p::context.IsFloodfill ()) |
|
|
|
|
|
|
|
i2p::data::netdb.PostI2NPMsg (msg); |
|
|
|
|
|
|
|
break; |
|
|
|
case eI2NPDeliveryStatus: |
|
|
|
case eI2NPDeliveryStatus: |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (msg->from && msg->from->GetTunnelPool ()) |
|
|
|
if (msg->from && msg->from->GetTunnelPool ()) |
|
|
@ -813,10 +823,14 @@ namespace i2p |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
case eI2NPVariableTunnelBuild: |
|
|
|
case eI2NPVariableTunnelBuild: |
|
|
|
case eI2NPVariableTunnelBuildReply: |
|
|
|
|
|
|
|
case eI2NPTunnelBuild: |
|
|
|
case eI2NPTunnelBuild: |
|
|
|
case eI2NPTunnelBuildReply: |
|
|
|
|
|
|
|
case eI2NPShortTunnelBuild: |
|
|
|
case eI2NPShortTunnelBuild: |
|
|
|
|
|
|
|
// forward to tunnel thread
|
|
|
|
|
|
|
|
if (!msg->from) |
|
|
|
|
|
|
|
i2p::tunnel::tunnels.PostTunnelData (msg); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case eI2NPVariableTunnelBuildReply: |
|
|
|
|
|
|
|
case eI2NPTunnelBuildReply: |
|
|
|
case eI2NPShortTunnelBuildReply: |
|
|
|
case eI2NPShortTunnelBuildReply: |
|
|
|
// forward to tunnel thread
|
|
|
|
// forward to tunnel thread
|
|
|
|
i2p::tunnel::tunnels.PostTunnelData (msg); |
|
|
|
i2p::tunnel::tunnels.PostTunnelData (msg); |
|
|
|