1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-18 04:19:58 +00:00

override reply token only if non-zero

This commit is contained in:
orignal 2023-04-28 08:01:02 -04:00
parent ead6a6dca3
commit 2af4a2b58d
2 changed files with 4 additions and 2 deletions

View File

@ -593,7 +593,8 @@ namespace tunnel
{
// transit DatabaseStore might contain new/updated RI
auto m = CopyI2NPMessage (msg);
memset (m->GetPayload () + DATABASE_STORE_REPLY_TOKEN_OFFSET, 0xFF, 4); // fake replyToken meaning no reply
if (bufbe32toh (m->GetPayload () + DATABASE_STORE_REPLY_TOKEN_OFFSET))
memset (m->GetPayload () + DATABASE_STORE_REPLY_TOKEN_OFFSET, 0xFF, 4); // fake replyToken meaning no reply
i2p::data::netdb.PostI2NPMsg (m);
}
tunnel->SendTunnelDataMsg (msg);

View File

@ -331,7 +331,8 @@ namespace tunnel
else if (IsRouterInfoMsg (msg.data))
{
auto m = CopyI2NPMessage (msg.data);
memset (m->GetPayload () + DATABASE_STORE_REPLY_TOKEN_OFFSET, 0xFF, 4); // fake replyToken meaning no reply
if (bufbe32toh (m->GetPayload () + DATABASE_STORE_REPLY_TOKEN_OFFSET))
memset (m->GetPayload () + DATABASE_STORE_REPLY_TOKEN_OFFSET, 0xFF, 4); // fake replyToken meaning no reply
i2p::data::netdb.PostI2NPMsg (m);
}
}