mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Small fix: should expire packets to prevent repeated WHOISes.
This commit is contained in:
parent
e3cf756785
commit
ff5e22031a
1 changed files with 2 additions and 1 deletions
|
@ -580,10 +580,11 @@ void Switch::doAnythingWaitingForPeer(void *tPtr,const SharedPtr<Peer> &peer)
|
||||||
}
|
}
|
||||||
|
|
||||||
// finish processing any packets waiting on peer's public key / identity
|
// finish processing any packets waiting on peer's public key / identity
|
||||||
|
const uint64_t now = RR->node->now();
|
||||||
for(unsigned int ptr=0;ptr<ZT_RX_QUEUE_SIZE;++ptr) {
|
for(unsigned int ptr=0;ptr<ZT_RX_QUEUE_SIZE;++ptr) {
|
||||||
RXQueueEntry *const rq = &(_rxQueue[ptr]);
|
RXQueueEntry *const rq = &(_rxQueue[ptr]);
|
||||||
if ((rq->timestamp)&&(rq->complete)) {
|
if ((rq->timestamp)&&(rq->complete)) {
|
||||||
if (rq->frag0.tryDecode(RR,tPtr))
|
if ((rq->frag0.tryDecode(RR,tPtr))||((now - rq->timestamp) > ZT_RECEIVE_QUEUE_TIMEOUT))
|
||||||
rq->timestamp = 0;
|
rq->timestamp = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue