Add a circuit breaker for VERB_PUSH_DIRECT_PATHS.
This commit is contained in:
parent
88b100e5d0
commit
cdc99bfee1
4 changed files with 56 additions and 8 deletions
|
@ -901,6 +901,11 @@ bool IncomingPacket::_doPUSH_DIRECT_PATHS(const RuntimeEnvironment *RR,const Sha
|
|||
{
|
||||
try {
|
||||
const uint64_t now = RR->node->now();
|
||||
if (!peer->shouldRespondToDirectPathPush(now)) {
|
||||
TRACE("dropped PUSH_DIRECT_PATHS from %s(%s): circuit breaker tripped",source().toString().c_str(),_remoteAddress.toString().c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
const Path *currentBest = peer->getBestPath(now);
|
||||
|
||||
unsigned int count = at<uint16_t>(ZT_PACKET_IDX_PAYLOAD);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue