From 66bc29d0754520992917e16d7c01db8195bd99ed Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 5 Jul 2022 19:15:50 -0400 Subject: [PATCH] insert received RouterInfo into netdb immediately --- libi2pd/SSU2Session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libi2pd/SSU2Session.cpp b/libi2pd/SSU2Session.cpp index 401c6768..0941b662 100644 --- a/libi2pd/SSU2Session.cpp +++ b/libi2pd/SSU2Session.cpp @@ -1119,11 +1119,11 @@ namespace transport break; case eSSU2BlkRouterInfo: { - // not from SessionConfirmed + // not from SessionConfirmed, we must add it instantly to use in next block LogPrint (eLogDebug, "SSU2: RouterInfo"); auto ri = ExtractRouterInfo (buf + offset, size); if (ri) - i2p::data::netdb.PostI2NPMsg (CreateI2NPMessage (eI2NPDummyMsg, ri->GetBuffer (), ri->GetBufferLen ())); // TODO: should insert ri + i2p::data::netdb.AddRouterInfo (ri->GetBuffer (), ri->GetBufferLen ()); // TODO: add ri break; } case eSSU2BlkI2NPMessage: