mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
don't reply to DatabaseStore messages extracted from transit
This commit is contained in:
@@ -586,10 +586,16 @@ namespace tunnel
|
||||
auto typeID = msg->GetTypeID ();
|
||||
LogPrint (eLogDebug, "Tunnel: Gateway of ", (int) len, " bytes for tunnel ", tunnel->GetTunnelID (), ", msg type ", (int)typeID);
|
||||
|
||||
if (IsRouterInfoMsg (msg) || typeID == eI2NPDatabaseSearchReply)
|
||||
// transit DatabaseStore my contain new/updated RI
|
||||
// or DatabaseSearchReply with new routers
|
||||
if (typeID == eI2NPDatabaseSearchReply)
|
||||
// DatabaseSearchReply with new routers
|
||||
i2p::data::netdb.PostI2NPMsg (CopyI2NPMessage (msg));
|
||||
else if (IsRouterInfoMsg (msg))
|
||||
{
|
||||
// transit DatabaseStore might contain new/updated RI
|
||||
auto m = CopyI2NPMessage (msg);
|
||||
memset (m->GetPayload () + DATABASE_STORE_REPLY_TOKEN_OFFSET, 0, 4); // no reply
|
||||
i2p::data::netdb.PostI2NPMsg (m);
|
||||
}
|
||||
tunnel->SendTunnelDataMsg (msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user