Merge remote-tracking branch 'purple/openssl' into meshnet

This commit is contained in:
Jeff Becker 2016-06-30 17:48:46 -04:00
commit c29359e7a8
No known key found for this signature in database
GPG key ID: AB950234D6EA286B
4 changed files with 28 additions and 18 deletions

View file

@ -457,6 +457,12 @@ namespace data
}
offset += 32;
}
// we must send reply back before this check
if (ident == i2p::context.GetIdentHash ())
{
LogPrint (eLogError, "NetDb: database store with own RouterInfo received, dropped");
return;
}
size_t payloadOffset = offset;
bool updated = false;
@ -496,6 +502,7 @@ namespace data
floodMsg->FillI2NPMessageHeader (eI2NPDatabaseStore);
std::set<IdentHash> excluded;
excluded.insert (i2p::context.GetIdentHash ()); // don't flood to itself
excluded.insert (ident); // don't flood back
for (int i = 0; i < 3; i++)
{
auto floodfill = GetClosestFloodfill (ident, excluded);