From f39df114d112e2f83e7fd0559eb90c911ce2ac9c Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 11 Oct 2013 10:46:49 -0300 Subject: [PATCH] increase dht flood protection to 1000 packets / 5 sec. which threshold is good remains to be decided, for now i just don't want an additional source of problems (banning legit peers). --- libtorrent/src/kademlia/dht_tracker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtorrent/src/kademlia/dht_tracker.cpp b/libtorrent/src/kademlia/dht_tracker.cpp index 6724ab2b..24459306 100644 --- a/libtorrent/src/kademlia/dht_tracker.cpp +++ b/libtorrent/src/kademlia/dht_tracker.cpp @@ -492,7 +492,7 @@ namespace libtorrent { namespace dht if (match) { ++match->count; - if (match->count >= 200) + if (match->count >= 1000) { if (now < match->limit) { @@ -504,7 +504,7 @@ namespace libtorrent { namespace dht << " count: " << match->count << " ]"; } #endif - if (match->count == 200) + if (match->count == 1000) { printf(" BANNING PEER [ ip: %s:%d ] time: %.3f ]\n", ep.address().to_string().c_str(), ep.port(),