mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-03-22 12:05:55 +00:00
Fix some broken TRACEs and a tiny reorder in a few ifs.
This commit is contained in:
parent
2b3e1d5c10
commit
284e5d83b5
@ -386,7 +386,7 @@ bool Peer::validateAndSetNetworkMembershipCertificate(uint64_t nwid,const Certif
|
||||
|
||||
// Check signature, log and return if cert is invalid
|
||||
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
|
||||
}
|
||||
|
||||
@ -395,7 +395,7 @@ bool Peer::validateAndSetNetworkMembershipCertificate(uint64_t nwid,const Certif
|
||||
// We are the controller: RR->identity.address() == controller() == cert.signedBy()
|
||||
// So, verify that we signed th cert ourself
|
||||
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
|
||||
}
|
||||
|
||||
@ -411,7 +411,7 @@ bool Peer::validateAndSetNetworkMembershipCertificate(uint64_t nwid,const Certif
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
@ -191,10 +191,10 @@ private:
|
||||
unsigned long i = ZT_RX_QUEUE_SIZE;
|
||||
while (i) {
|
||||
rq = &(_rxQueue[--i]);
|
||||
if (rq->timestamp < oldest->timestamp)
|
||||
oldest = rq;
|
||||
if ((rq->packetId == packetId)&&(rq->timestamp))
|
||||
return rq;
|
||||
if (rq->timestamp < oldest->timestamp)
|
||||
oldest = rq;
|
||||
}
|
||||
return oldest;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user