mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Fix some broken TRACEs and a tiny reorder in a few ifs.
This commit is contained in:
parent
2b3e1d5c10
commit
284e5d83b5
2 changed files with 5 additions and 5 deletions
|
@ -386,7 +386,7 @@ bool Peer::validateAndSetNetworkMembershipCertificate(uint64_t nwid,const Certif
|
||||||
|
|
||||||
// Check signature, log and return if cert is invalid
|
// Check signature, log and return if cert is invalid
|
||||||
if (com.signedBy() != Network::controllerFor(nwid)) {
|
if (com.signedBy() != Network::controllerFor(nwid)) {
|
||||||
TRACE("rejected network membership certificate for %.16llx signed by %s: signer not a controller of this network",(unsigned long long)_id,com.signedBy().toString().c_str());
|
TRACE("rejected network membership certificate for %.16llx signed by %s: signer not a controller of this network",(unsigned long long)nwid,com.signedBy().toString().c_str());
|
||||||
return false; // invalid signer
|
return false; // invalid signer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ bool Peer::validateAndSetNetworkMembershipCertificate(uint64_t nwid,const Certif
|
||||||
// We are the controller: RR->identity.address() == controller() == cert.signedBy()
|
// We are the controller: RR->identity.address() == controller() == cert.signedBy()
|
||||||
// So, verify that we signed th cert ourself
|
// So, verify that we signed th cert ourself
|
||||||
if (!com.verify(RR->identity)) {
|
if (!com.verify(RR->identity)) {
|
||||||
TRACE("rejected network membership certificate for %.16llx self signed by %s: signature check failed",(unsigned long long)_id,com.signedBy().toString().c_str());
|
TRACE("rejected network membership certificate for %.16llx self signed by %s: signature check failed",(unsigned long long)nwid,com.signedBy().toString().c_str());
|
||||||
return false; // invalid signature
|
return false; // invalid signature
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ bool Peer::validateAndSetNetworkMembershipCertificate(uint64_t nwid,const Certif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!com.verify(signer->identity())) {
|
if (!com.verify(signer->identity())) {
|
||||||
TRACE("rejected network membership certificate for %.16llx signed by %s: signature check failed",(unsigned long long)_id,com.signedBy().toString().c_str());
|
TRACE("rejected network membership certificate for %.16llx signed by %s: signature check failed",(unsigned long long)nwid,com.signedBy().toString().c_str());
|
||||||
return false; // invalid signature
|
return false; // invalid signature
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,10 +191,10 @@ private:
|
||||||
unsigned long i = ZT_RX_QUEUE_SIZE;
|
unsigned long i = ZT_RX_QUEUE_SIZE;
|
||||||
while (i) {
|
while (i) {
|
||||||
rq = &(_rxQueue[--i]);
|
rq = &(_rxQueue[--i]);
|
||||||
if (rq->timestamp < oldest->timestamp)
|
|
||||||
oldest = rq;
|
|
||||||
if ((rq->packetId == packetId)&&(rq->timestamp))
|
if ((rq->packetId == packetId)&&(rq->timestamp))
|
||||||
return rq;
|
return rq;
|
||||||
|
if (rq->timestamp < oldest->timestamp)
|
||||||
|
oldest = rq;
|
||||||
}
|
}
|
||||||
return oldest;
|
return oldest;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue