From e7d5676233c5828eed0d9437932533bf52e0fdfa Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 1 May 2024 09:35:04 -0400 Subject: [PATCH] NetDB: Deny old ANY lookup type to non-ff --- .../kademlia/FloodfillDatabaseLookupMessageHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillDatabaseLookupMessageHandler.java b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillDatabaseLookupMessageHandler.java index bb9a9b4374..a7af830e9d 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillDatabaseLookupMessageHandler.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillDatabaseLookupMessageHandler.java @@ -62,7 +62,8 @@ public Job createJob(I2NPMessage receivedMessage, RouterIdentity from, Hash from _context.statManager().addRateData("netDb.lookupsReceived", 1); DatabaseLookupMessage dlm = (DatabaseLookupMessage)receivedMessage; - if (dlm.getSearchType() == DatabaseLookupMessage.Type.EXPL && + DatabaseLookupMessage.Type type = dlm.getSearchType(); + if ((type == DatabaseLookupMessage.Type.EXPL || type == DatabaseLookupMessage.Type.ANY) && !_context.netDb().floodfillEnabled()) { if (_log.shouldLog(Log.WARN)) _log.warn("[dbid: " + _facade