From fe4d640504514c366066440d8d6ee2c75c553716 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 16 Dec 2014 14:50:29 -0500 Subject: [PATCH] drop incoming garlic messages if local destination doesn't exist anymore --- I2NPProtocol.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/I2NPProtocol.cpp b/I2NPProtocol.cpp index 84fbeafe..95079260 100644 --- a/I2NPProtocol.cpp +++ b/I2NPProtocol.cpp @@ -562,8 +562,16 @@ namespace i2p break; case eI2NPGarlic: LogPrint ("Garlic"); - if (msg->from && msg->from->GetTunnelPool ()) - msg->from->GetTunnelPool ()->ProcessGarlicMessage (msg); + if (msg->from) + { + if (msg->from->GetTunnelPool ()) + msg->from->GetTunnelPool ()->ProcessGarlicMessage (msg); + else + { + LogPrint (eLogInfo, "Local destination for garlic doesn't exist anymore"); + DeleteI2NPMessage (msg); + } + } else i2p::context.ProcessGarlicMessage (msg); break;