mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Roots need to respond to lots of WHOISes
This commit is contained in:
parent
e3b1fc2ac0
commit
0f3148bda2
2 changed files with 2 additions and 2 deletions
|
@ -393,7 +393,7 @@
|
||||||
/**
|
/**
|
||||||
* WHOIS rate limit (we allow these to be pretty fast)
|
* WHOIS rate limit (we allow these to be pretty fast)
|
||||||
*/
|
*/
|
||||||
#define ZT_PEER_WHOIS_RATE_LIMIT 50
|
#define ZT_PEER_WHOIS_RATE_LIMIT 100
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* General rate limit for other kinds of rate-limited packets (HELLO, credential request, etc.) both inbound and outbound
|
* General rate limit for other kinds of rate-limited packets (HELLO, credential request, etc.) both inbound and outbound
|
||||||
|
|
|
@ -552,7 +552,7 @@ bool IncomingPacket::_doOK(const RuntimeEnvironment *RR,const SharedPtr<Peer> &p
|
||||||
bool IncomingPacket::_doWHOIS(const RuntimeEnvironment *RR,const SharedPtr<Peer> &peer)
|
bool IncomingPacket::_doWHOIS(const RuntimeEnvironment *RR,const SharedPtr<Peer> &peer)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!peer->rateGateInboundWhoisRequest(RR->node->now())) {
|
if ((!RR->topology->amRoot())&&(!peer->rateGateInboundWhoisRequest(RR->node->now()))) {
|
||||||
TRACE("dropped WHOIS from %s(%s): rate limit circuit breaker tripped",source().toString().c_str(),_path->address().toString().c_str());
|
TRACE("dropped WHOIS from %s(%s): rate limit circuit breaker tripped",source().toString().c_str(),_path->address().toString().c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue