mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-02-01 13:22:15 -08:00
Added some more logging to the ctl around deauths
This commit is contained in:
parent
76ba89060b
commit
c21ff23477
2 changed files with 12 additions and 1 deletions
|
|
@ -1655,6 +1655,7 @@ void EmbeddedNetworkController::onNetworkMemberDeauthorize(const void* db, uint6
|
|||
auto span = tracer->StartSpan("embedded_controller::onNetworkMemberDeauthorize");
|
||||
auto scope = tracer->WithActiveSpan(span);
|
||||
|
||||
fprintf(stderr, "Member Deauthorized: nwid=%.16llx, nodeid=%.10llx\n", networkId, memberId);
|
||||
const int64_t now = OSUtils::now();
|
||||
Revocation rev(
|
||||
(uint32_t)_node->prng(), networkId, 0, now, ZT_REVOCATION_FLAG_FAST_PROPAGATE, Address(memberId),
|
||||
|
|
@ -1663,8 +1664,13 @@ void EmbeddedNetworkController::onNetworkMemberDeauthorize(const void* db, uint6
|
|||
{
|
||||
std::lock_guard<std::mutex> l(_memberStatus_l);
|
||||
for (auto i = _memberStatus.begin(); i != _memberStatus.end(); ++i) {
|
||||
if ((i->first.networkId == networkId) && (i->second.online(now)))
|
||||
if ((i->first.networkId == networkId) && (i->second.online(now))) {
|
||||
_node->ncSendRevocation(Address(i->first.nodeId), rev);
|
||||
fprintf(stderr, " Sent revocation to %.10llx\n", i->first.nodeId);
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, " Not sending revocation to %.10llx\n", i->first.nodeId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue