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).
This commit is contained in:
Miguel Freitas 2013-10-11 10:46:49 -03:00
parent e5b21d6810
commit f39df114d1

View File

@ -492,7 +492,7 @@ namespace libtorrent { namespace dht
if (match) if (match)
{ {
++match->count; ++match->count;
if (match->count >= 200) if (match->count >= 1000)
{ {
if (now < match->limit) if (now < match->limit)
{ {
@ -504,7 +504,7 @@ namespace libtorrent { namespace dht
<< " count: " << match->count << " ]"; << " count: " << match->count << " ]";
} }
#endif #endif
if (match->count == 200) if (match->count == 1000)
{ {
printf(" BANNING PEER [ ip: %s:%d ] time: %.3f ]\n", printf(" BANNING PEER [ ip: %s:%d ] time: %.3f ]\n",
ep.address().to_string().c_str(), ep.port(), ep.address().to_string().c_str(), ep.port(),