mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-17 14:48:17 +00:00
Instantaneous blacklisting and credential revocation.
This commit is contained in:
@ -888,16 +888,12 @@ bool Network::_isAllowed(const SharedPtr<Peer> &peer) const
|
||||
// Assumes _lock is locked
|
||||
try {
|
||||
if (_config) {
|
||||
if (_config.isPublic()) {
|
||||
return true;
|
||||
} else {
|
||||
const Membership *m = _memberships.get(peer->address());
|
||||
if (m)
|
||||
return _config.com.agreesWith(m->com());
|
||||
}
|
||||
const Membership *const m = _memberships.get(peer->address());
|
||||
if (m)
|
||||
return m->isAllowedOnNetwork(_config);
|
||||
}
|
||||
} catch ( ... ) {
|
||||
TRACE("isAllowed() check failed for peer %s: unexpected exception: unexpected exception",peer->address().toString().c_str());
|
||||
TRACE("isAllowed() check failed for peer %s: unexpected exception",peer->address().toString().c_str());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user