From c3730e8b479353e28c7014016bf58e342daeff7b Mon Sep 17 00:00:00 2001 From: zzz Date: Wed, 1 May 2024 09:32:07 -0400 Subject: [PATCH] NetDB: Limit number of DSRM entries to follow for an exploratory reply --- .../src/net/i2p/router/networkdb/kademlia/SearchReplyJob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/SearchReplyJob.java b/router/java/src/net/i2p/router/networkdb/kademlia/SearchReplyJob.java index 84fca4fddf..be2705d74b 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/SearchReplyJob.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/SearchReplyJob.java @@ -50,7 +50,7 @@ public SearchReplyJob(RouterContext enclosingContext, SearchJob job, DatabaseSea public String getName() { return "Process Reply for Kademlia Search"; } public void runJob() { - int count = _msg.getNumReplies(); + int count = Math.min(_msg.getNumReplies(), 2 * SingleLookupJob.MAX_TO_FOLLOW); for (int i = 0; i < count; i++) { processPeer(i); }