Browse Source

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).
miguelfreitas
Miguel Freitas 11 years ago
parent
commit
f39df114d1
  1. 4
      libtorrent/src/kademlia/dht_tracker.cpp

4
libtorrent/src/kademlia/dht_tracker.cpp

@ -492,7 +492,7 @@ namespace libtorrent { namespace dht @@ -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 @@ -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(),

Loading…
Cancel
Save